Similar "Handler" class in Java

While learning Android recently, there is a Handler class in android that is very useful. We can "send" the executable to the end of another thread, something like a queue, in which case it is very dynamic. Does anyone know of a similar class in Java SE that can do this?

+6
source share
1 answer

JavaSwing has SwingUtilities.invokeLater() , which takes Runnable as a parameter. This is one way to publish something in a UI theater.

+4
source

Source: https://habr.com/ru/post/925425/


All Articles