예제 #1
0
파일: demo.py 프로젝트: keitheis/tulip-talk
def bar_synchronous(loop, client):
    for i in range(10):
        widget = make_widget_synchronous()
        loop.call_soon_threadsafe(client.append_widget, 'bar', widget)
        loop.call_soon_threadsafe(client.log,
                                  'Made widget {} in another thread'.format(i))
예제 #2
0
파일: demo.py 프로젝트: keitheis/tulip-talk
def bar_synchronous():
    widgets = []
    for i in range(12):
        widget = make_widget_synchronous()
        widgets.append(widget)
    return widgets
예제 #3
0
파일: demo.py 프로젝트: feihong/tulip-talk
def bar_synchronous(loop, client):
    for i in range(10):
        widget = make_widget_synchronous()
        loop.call_soon_threadsafe(client.append_widget, 'bar', widget)
        loop.call_soon_threadsafe(client.log,
            'Made widget {} in another thread'.format(i))