[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Multi threaded application
- Subject: Multi threaded application
- From: chill at global-village.net (Chuck Hill)
- Date: Thu Jul 10 10:28:02 2003
- In-reply-to: <sf0d6d03.061@mailhost.cedes.com>
EOF does not support concurrent threads of execution in most of EOAccess
and some of EOControl. This does not affect *concurrent request dispatch*
provided that (and this IS important) you lock and unlock your editing
context. You must (not should or ought to, must) lock and unlock the
editing contexts.
If each session has its own EOObjectStoreCoordinator then there will be no
resource contention for EOAccess/EOControl. This DOES NOT relieve you of
the need to lockand unlock your editing contexts. The only editing
contexts safe to use without locking are the shared ec (which EOF locks)
and the session's default ec (which the session locks).
Giving a session its own EOObjectStoreCoordinator also gives it its own
EODatabaseContext, EODatabaseChannel, EOAdaptor etc.
Read all of
http://developer.apple.com/documentation/WebObjects/Enterprise_Objects/index
.html
In particular,
http://developer.apple.com/documentation/WebObjects/Enterprise_Objects/Geogr
aphy/chapter_5_section_7.html
Is that what you were asking?
Chuck
At 01:41 PM 10/07/2003 +0200, COAST wrote:
>Hi list
>
>I'm still using W5.1, this first.
>
>As far as I know you shouldn't use a WO-App in multi threaded modus, right
?!?
>
>But if you need to (or want to), the problem is that the EOF is not thread
save, right too ?!?
>
>Now my question:
>
>What exactly is not thread save in the EOF ?
>
>I spend each user (session) an own editingContext and also an own
EOObjectStoreCoordinator. It this enough to
>be thread safe ? Or is it only thread save "within the EOControl" ?
>
>Will it be thread save spending each session it's "own EOAccess
environment" (EODatabaseContext, EODatabaseChannel, EOAdaptor etc.) ?
>
>Thanks for any input
>
>Peter
>
>_______________________________________________
>WebObjects-dev mailing list
>WebObjects-dev@xxxxxxxxxxxxx
>http://www.omnigroup.com/mailman/listinfo/webobjects-dev
>
--
Chuck Hill chill@xxxxxxxxxxxxxxxxxx
Global Village Consulting Inc. http://www.global-village.net