Re: ThreadPool with Seaside - how?

Philippe Marschall <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.squeak.seaside
Message-ID <CA+LFMPgHzUBd0oAvFZxm=yzEQO+FwMdWAWd7EpNcwetHetyzhQ@mail.gmail.com>
On Wed, Jul 26, 2017 at 12:09 PM, Sabine Manaa <[email protected]> wrote:
> Hi,
>
> [1] Paul and Ramon suggested to use the ThreadPool [2] to me.
> I want to replace my forked code for generating reports with it.
>
> When trying to use it within my seaside application, I have a problem.
> I reduced the Problem to this:
>
> -> this works, a simple in inspector pops up
> html mdlButton
> onClick: (html jQuery ajax script: [ :script | [ #simple inspect ] queueWork
> ]);
> with: '0'.
>
> -> this does not work.
>
> The generation of my reports needs the sessions objects.

Most Seaside objects are not thread safe as they are meant to be used
only within the request-response thread. WASession is one of them
that's why it's normally behind a WAMutualExclusionFilter. In theory
any forked access to a session should go through that mutex. In
addition forked access to a session is not recorded in the session
cache so it may expire at any time. If you need session data in a
forked process the recommendation would be to factor that data out
into an immutable object and store with object in the session and pass
this object to the forked process.

Cheers
Philippe
_______________________________________________
seaside mailing list
[email protected]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.