multithreading tag

26 questions


1 answers
135 views
0
Time.sleep is thread sleep? Process sleep?

time from Linux/UNIX to Python.Does sleep() block only one thread?Or do you block the entire process?


1 answers
62 views
0
Multiprocessing vs. multi-threading with Python

Which is better, multiprocessing or multi-threading?I heard that you don't need to use GIL for multiprocessing, is there anything else?Please tell us the difference and pros and cons of the two


1 answers
63 views
0
What does Synchronized mean?

What does Synchronized mean?


1 answers
73 views
0
Python Multi-Threading Detects End of One Thread

def th1(): a = 0 for i in range(10): a = a + 1def th2(): while True: print(Loading)Assume that when there are two functions, the th1 and th2 functions are rotated together by multi-threading.At this...

1 years ago

1 answers
112 views
0
How do I spin Runnable Trash on Android?

We are developing an application that shows the same text at fixed intervals on the Android emulator screen.I'm writing a Handler class now. handler = new Handler();Runnable r = new Runnable() { publi...

1 years ago

1 answers
142 views
0
What's better about synchronized methods than synchronized blocks when synchronized on threads?

Please show me an example of how the Synchronized method is better than Synchronized Block in the thread.


1 answers
76 views
0
How do I check if the current thread is the main thread?

I need a code to check whether the current thread is the main thread or not, how can I do it


1 answers
62 views
0
Service vs IntentService

It's not possible with the service, but can you tell me an example of what you can do with IntentService (including the opposite situation)?I understand that one IntentService runs on one independent ...


1 answers
70 views
0
How do I spin threads on Android?

As a practice, I'm making an application that prints strings at intervals defined on the screen. To turn the thread handler = new Handler();Runnable r = new Runnable() { public void run() { tv.append...

1 years ago

1 answers
89 views
0
Which do you like better, "implementations Runable" or "extends Thread"?

I was looking at how to create threads in Java, and there were two ways: Runnable and Thread! public class ThreadA implements Runnable { public void run() { //Code } } //Started with a new Thread(t...

1 years ago
« - 2 - »

© 2024 OneMinuteCode. All rights reserved.