<s> '''<STR_LIT>''' <EOL> from time import time <EOL> from time import sleep <EOL> import threading <EOL> def main ( ) : <EOL> if PYTHON == '<STR_LIT>' : <EOL> pythonjs . configure ( direct_operator = '<STR_LIT:+>' ) <EOL> pass <EOL> else : <EOL> def l ( f , a ) : threading . _start_new_thread ( f , a ) <EOL> threading . start_webworker = l <EOL> seq = { } <EOL> w1 = threading . start_webworker ( worker , ( seq , '<STR_LIT>' , '<STR_LIT:i>' ) ) <EOL> w2 = threading . start_webworker ( worker , ( seq , '<STR_LIT>' , '<STR_LIT:p>' ) ) <EOL> sleep ( <NUM_LIT:1.0> ) <EOL> TestError ( '<STR_LIT:a>' in seq ) <EOL> TestError ( '<STR_LIT:i>' in seq ) <EOL> print ( '<STR_LIT>' ) <EOL> print ( seq ) <EOL> if PYTHON != '<STR_LIT>' : <EOL> class webworker ( object ) : <EOL> def __enter__ ( self , * args ) : pass <EOL> def __exit__ ( self , * args ) : pass <EOL> webworker = webworker ( ) <EOL> with webworker : <EOL> def worker ( seq , s , break_on ) : <EOL> print ( '<STR_LIT>' ) <EOL> for char in s : <EOL> seq [ char ] = True <EOL> if break_on in seq : <EOL> break <EOL> sleep ( <NUM_LIT:0.1> ) <EOL> print ( '<STR_LIT>' ) <EOL> print ( seq ) </s>
