race condition in EwLinearList>>selectedItems

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

race condition in EwLinearList>>selectedItems

woschwot
We sporadically get a race condition ((ExCLDTIndexOutOfRange) Index out of range.) in
EwLinearList>>selectedItems
 
 ^self getSelectedPos asOrderedCollection collect: [:index | self itemAt: index]
 
Our current workaround is:
 
 ^((self getSelectedPos asOrderedCollection ) collect: [:index | [ self itemAt: index] when: ExError do: [ :sig | sig exitWith: nil ] ]) select: [ :e | e notNil ]
 
Are there better solutions to avoid this?
Does a critical block help?

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.