-
as seen on Stack Overflow
- Search for 'Stack Overflow'
What are the advantages/disadvantages in placing a lengthy network access code in a thread in an activity or a thread in a service? How would it affect the application? I am writing a streaming audio player and from what I've read so far putting the code in a service will still end up blocking the…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi
I have an ASP.Net webservice running.
When the system date changes, i want to close all the threads and restart them again, if the thread/s aren't doing any work. If any of the thread/s is in the process of doing some work(active threads), then i need to wait till the current thread/s complete…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi, this is for an assignment so I'm not looking for code.
I have to simulate a game where each player has turns and needs to 'pay attention' to what's going on.
So far, i know I'll need two threads for each player, one that will sleep until the player's turn and the other paying attention.
My…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
When using java threads, one has to take care of the basic problems that come with concurrency through synchronization etc.
AFAIK Tomcat also works with threads to handle its workload. Why is it, that I don't have to think about making my code threadsafe when it is running in Tomcat?
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi All,
I am working on a project which involves reusing as well as migrating some of the existing MFC code to C#.
The current code in MFC, creates some threads and uses ::PostthreadeMessage() and ON_THREAD_MESSAGE(msg,func) for inter thread asynchronous communication through messages.
::PostthreadeMessage()…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I overused hashSets but it was slow, then changed to Stacks, speed boost-up. Poly's reply uses Collections.emptyList() as immutable list, cutting out excess null-checkers. No Collections.emptyStack(). Combining the words stack and immutability, from the last experiences, gets "immutable stack" (probably…
>>> More
-
as seen on Super User
- Search for 'Super User'
My iTunes 9.0.2 hangs on launch in OS X 10.6.2. This doesn't happen all the time, only if I've been running for a while. Then it will recur until I restart. Similarly Safari 4.0.4 will hang in the flash player plugin when about to play a video. If I restart both these problems go away until later…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I need to write a function par :: String -> Bool to verify if a given string with parentheses is matching using stack module.
Ex:
par "(((()[()])))" = True
par "((]())" = False
Here's my stack module implementation:
module Stack (Stack,
push, pop, top,
empty, isEmpty)
…
>>> More
-
as seen on Server Fault
- Search for 'Server Fault'
Hey All,
I'm trying to get a TDM400P card with FXO module to connect to our PSTN line. The card is correctly detected by Linux:
[trixbox1.localdomain asterisk]# lspci
00:09.0 Communication controller:
Tiger Jet Network Inc. Tiger3XX
Modem/ISDN interface
I've run setup-pstn which…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
In pthread, After reaching yellow zone in stack, signal handler stop the recursive function by making it return
however, we can only continue to use extra area in yellow zone,
how to clear the rubbish before the yellow zone in the thread stack ?
(Copied from "answers"):
#include <pthread…
>>> More