Thanks, Greg.

 

Roger Whitcomb | Architect, Engineering | [email protected]
<mailto:[email protected]> | Ingres | 500 Arguello Street |
Suite 200 | Redwood City | CA | 94063 | USA
<http://www.google.com/maps?f=q&hl=en&geocode=&q=500+Arguello+Street+%7C
+Suite+200+%7C+Redwood+City+%7C+CA+%7C+94063+%7C+USA+&sll=37.0625,-95.67
7068&sspn=50.557552,73.037109&ie=UTF8&t=h&z=16&iwloc=addr>  | +1
650-587-5596 | fax: +1 650-587-5550

From: Greg Brown [mailto:[email protected]] 
Sent: Friday, April 22, 2011 10:07 AM
To: [email protected]
Subject: Re: What is legal to do in second thread?

 

        Trying to understand the Pivot threading model:  what is okay to
do in a background thread re: the GUI objects?

        -          Is it legal to change the data model (of a TreeView
or similar)?

 

Nope.





-          Is it legal to update the text of a TextInput (or similar)?

 

Nope.




What are the implications of doing things that aren't "legal"?  Are we
threatening to crash or destabilize the JVM?  

 

Probably not.





Or is it that we may have race conditions or data corruption because
data structures are not thread-safe?

 

Yes, that is possible.

 

Pivot's threading model is basically the same as Swing's - any UI
updates need to be done on the UI thread. Any time you want to call into
the UI thread from a background thread, you need to call
ApplicationContext#queueCallback().

 

G

 

Reply via email to