Methods and apparatuses are disclosed for transferring a method call from
an invoke thread to an event dispatch thread. The invoke thread and the
event dispatch thread may execute independent of one another and the
event dispatch thread may have an associated queue. The method may
include defining a new call on the invoke thread. The new call may
include identification of a method, identification of an object, one or
more arguments, and a coalescing indicator indicating a type of
coalescing for the call. The method may further include sending, during
execution of the invoke thread, the new call to the queue, one or more
previous calls being stored in the queue, and coalescing the new call
with one of the previous calls in the queue according to the type of
coalescing indicated by the coalescing indicator.