On 10/07/2012 10:11, Roberto De Ioris wrote:
Add

import uwsgi

on top of the code

Perfect!
I also had to import time.
Here's the result after 4 requests:
WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x7f7ffc61d1c0 pid: 26888 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (pid: 26888, cores: 1)
spawned uWSGI worker 2 (pid: 979, cores: 1)
spawned uWSGI worker 3 (pid: 21350, cores: 1)
i am worker 3


As another test, I then removed the lock/unlock calls and got this:
WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x7f7ffc61d1c0 pid: 4204 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (pid: 4204, cores: 1)
spawned uWSGI worker 2 (pid: 21189, cores: 1)
spawned uWSGI worker 3 (pid: 22562, cores: 1)
i am worker 2
i am worker 3
i am worker 1


I then repeated the same tests but with the current default locking mechanism of ipcsem and got the same results as above.

So would we conclude that POSIX semaphores are infact process shared on NetBSD and uWSGI can use them?

Thanks

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

Reply via email to