synchronized object int GWT

1,408 views
Skip to first unread message

Rand

unread,
May 24, 2012, 4:22:28 PM5/24/12
to Google Web Toolkit
hello all
i am new in GWT ..and i have one question :
dose it enabled to apply the concept od synchronized objects java in
GWT ?? in way that i can synchronize the client and the server ?

thank

Harshal Patil

unread,
May 31, 2012, 7:16:21 AM5/31/12
to google-we...@googlegroups.com
Hello,

At the gwt client's ends JavaScript interpretations are single-threaded, so while GWT silently accepts the synchronized keyword, it has no real effect. Synchronization-related library methods are not available, including Object.wait()Object.notify(), and Object.notifyAll() .

and the server end you can directly use  synchronized  as you are using in java.

thanx,

Harshal


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


Ashton Thomas

unread,
Jun 5, 2012, 10:08:34 PM6/5/12
to google-we...@googlegroups.com
You might want to consider the use of synchronized methods when dealing with async rpcs request. The blog post linked below shows one use case involving synchronized methods

http://www.summa-tech.com/blog/2010/11/29/parallel-asynchronous-calls-in-gwt/

Reply all
Reply to author
Forward
0 new messages