Question on Concurrency and Lists

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Question on Concurrency and Lists

Holger Freyther
Hi all,

when I know that I will add/remove items from an OrderedCollection in multiple
processes, I should always go through a critical section? Or is there some
nice guarantee on atomicity of these operations?

regards
        holger

_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Question on Concurrency and Lists

Paolo Bonzini-2
On 12/16/2010 09:17 PM, Holger Hans Peter Freyther wrote:
> Hi all,
>
> when I know that I will add/remove items from an OrderedCollection in multiple
> processes, I should always go through a critical section? Or is there some
> nice guarantee on atomicity of these operations?

Nope, the possibility that the OC must grow pretty much eliminates all
guarantees.

Paolo

_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Question on Concurrency and Lists

Holger Freyther
On 12/16/2010 09:23 PM, Paolo Bonzini wrote:
> On 12/16/2010 09:17 PM, Holger Hans Peter Freyther wrote:
>> Hi all,
>>
>> when I know that I will add/remove items from an OrderedCollection in multiple
>> processes, I should always go through a critical section? Or is there some
>> nice guarantee on atomicity of these operations?
>
> Nope, the possibility that the OC must grow pretty much eliminates all
> guarantees.

thanks. Is there a container with built-in synchronization?  or a generic
wrapper that handles doesNotUnderstood and then calls the wrapped class with
the lock held?


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Question on Concurrency and Lists

Paolo Bonzini-2
In reply to this post by Paolo Bonzini-2
On 12/16/2010 10:27 PM, Bèrto ëd Sèra wrote:
> Can we implement some level of transaction insulation policy like:
> http://www.postgresql.org/docs/9.0/static/transaction-iso.html

How does that relate to the Smalltalk object model?

Paolo

_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Question on Concurrency and Lists

Paolo Bonzini-2
On 12/16/2010 10:37 PM, Bèrto ëd Sèra wrote:
> I suppose it does in the same way it does to the relational model. You
> either have a lock at "transaction level" (and in that case what you do
> happens in a copy that eventually gets merged/committed into the common
> memory) or have more fine grained locks that agin may be merged or
> rollbacked.

Do you have any idea of what Gemstone does in terms of transaction
insulation?

Paolo

_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk