public static Object current_thread() { Object o = Thread.GetData( Thread.GetNamedDataSlot( "bglcthread" ) ); if( o is bglpthread ) { return ((bglpthread)o).thread; } else { return bigloo.foreign.BFALSE; } }