On Fri, Aug 17, 2012 at 12:21 PM, Roberto De Ioris <[email protected]> wrote:
>
> Just put the code in a python module you import with
>
> --shared-import <filename>
>
> all of the processes will inherit that memory area

interesting, is this to imply that updates to the module can be seen
by all processes?

i did some tests and i'm not seeing shmem-like behavior (HEAD):

# cat share.py
=====================================
share = {
    'hi': 'there',
    '1': [],
    '2': [],
    '3': [],
    '4': [],
    '5': [],
    '6': [],
    }
=====================================

# cat test_share.py
=====================================
import uwsgi

import share
from pprint import pformat as pp

def application(env, start_response):
    me = str(uwsgi.worker_id())
    share.share[me].append(uwsgi.started_on)
    start_response('200 OK', [('Content-Type', 'text/html')])
    yield '<h1>' + me + '</h1>'
    yield '<h3><pre>' + pp(share.share) + '</pre></h3>'
=====================================

... did i misinterpret?

-- 

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

Reply via email to