[Catalyst] Catalyst::Component/Model Instances and Attributes per
Request
Tomas Doran
bobtfish at bobtfish.net
Sun Jul 18 16:29:03 GMT 2010
On 17 Jul 2010, at 18:58, Alejandro Imass wrote:
> I am confused now. mod_worker will share the same code segment for
> sure, and if you said earlier that in some scenarios where the code
> segment is shared (i.e. two _threads_ using the same model instance)
> the ACCEPT_CONTEXT call will override any global variables (i.e. Moose
> object parameters) that were set by the previous the ACCEPT_CONTEXT
> call. Or I understood wrong....
Perl code isn't in the 'code segment' of your process.
As it's compiled and run dynamically, after all. :)
So only the perl executable and C shared libraries (.sos) will be in
code segments. All of your perl code is in data segments.
> I'm pretty sure there is no sequential guarantee (a queue/stack) when
> two controller threads use the same model instance, nor is the thread
> implementation aware that it should create a separate data segment for
> the second and beyond calls to ACCEPT_CONTEXT.
No, hang on.. This works using perl's threads, so be default you have
'nothing shared'..
I may be entirely wrong here (someone correct me?)
Cheers
t0m
More information about the Catalyst
mailing list