1) You can now pass the 'at' variable to your spool job specifiying the
date (in epoch/unix style) after which it has to be executed


# execute the job only after 300 seconds with priority 2

my_func.spool(at=time.time()+300, priority=2)


2) Signals can now be managed by the spooler using this syntax:

@signal(X, target='spooler')

or

uwsgi.register_signal(X, 'spooler', func)

3) spooler can now spawn threads (if enabled)

Now the only piece missing to have a fully featured async task manager is
finding a way to let async cores to wait for specific job completion.

Probably a generic framework to let cores wait for something will be a lot
better.

My idea is having something like:

(on core 1)

uwsgi.wait_for_event("job_done")

(on another core, or the spooler)

uwsgi.raise_event("job_done")

For async/evented programming this could be a huge improvement (think
about a chat system where each user can raise custom events)

-- 
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to