Skip to content
Advertisement

Tag: multithreading

segfault when using shout-python inside a thread

Recently a machine was upgraded/reinstalled from an older Ubuntu version to the most recent Debian version. Since then, I get a segfault in an application I wrote which sends data to an icecast daemon. After some searching, I focused it down to threading. As soon as I call shout.send from inside a thread, I get a segfault. Below is a

Who schedules threads?

I have a question about scheduling threads. on the one hand, I learned that threads are scheduled and treated as processes in Linux, meaning they get scheduled like any other process using the conventional methods. (for example, the Completely Fair Scheduler in linux) On the other hand, I also know that the CPU might also switch between threads using methods

Which thread handles the signal?

I have 2 threads(thread1 and thread2). And I have signal disposition for SIGINT. Whenever SIGINT occurs thread 2 should handle the signal. For that I wrote below program I compiled and and run the program. for every 1 second “thread1 active” is printing and for every 3 seconds “thread2 active” is printing. Now I generated SIGINT. But its printing “thread1

Multithreaded Programming with Bash Script

I am running a bash script as like that: Every time when I send a request I have to wait to finish it and write to a file and after that it continues to looping. However I want to do it asynchronously. I mean that it will send a request and loop without waiting response. However when a response comes

One to one mapping of Java Thread to Linux thread (LWP)

Is there a one to one mapping between Java Thread objects and OS threads (Lightweight processes). That is, if I have a Thread object, can I always identify precisely one associated OS thread, and will I always have the same associated OS thread? In general this is OS and JVM dependent, so I’ll restrict the question to Linux with the

Is fopen() a thread safe function in Linux?

If I use fopen() call to open a same file in multi-thread, and write data to the file. Should I use a mutex to ensure the data won’t be disordered? Answer If two threads both open the same file with fopen(), they will each have independent file streams (FILE *) backed by independent file descriptors referring to the same file.

Which threading model is used by node.js? [closed]

It’s difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 9 years ago. When a new client connects to a server running node.js, does it use

Advertisement