What can't be done in a thread?

Thread Starter

cmrincon

Joined Oct 25, 2017
40
Hi!

I'm currently studing threads in java / android, and i'm wondering if is there anything that cant be done in a non main thread? For example i know that all UI can't be done. Thanks
 

nsaspook

Joined Aug 27, 2009
13,079
It depends on what your are doing in any multi-threaded environment (like the Linux kernel). Java GUI and many other components are not guaranteed to be thread-safe. The main limitation are resource sharing in threads (IPC ends points, variables, etc.. are shared, that can easily cause thread dead-locks (blocks) without careful programming) vs independent address and resource space in processes in a single main thread.



https://www.ntu.edu.sg/home/ehchua/programming/java/J5e_multithreading.html
 
Top