def event_receiver (obj, id): """Used directly by uwsgi to handle events sent by demovibes.""" LOCK.acquire() global event event = obj uwsgi.green_unpause_all() LOCK.release()
def event_receiver(obj, id): LOCK.acquire() global event event = obj uwsgi.green_unpause_all() LOCK.release()
def send(): # this will write to all the core in PAUSED state uwsgi.green_write_all(request.GET['message'] + "<br/>") # this will unpause all the paused cores, so they will be re-inserted in the sched queue uwsgi.green_unpause_all() redirect('/sender')