One of my applications in my Django project require each request/visitor to that instance to have their own thread. This might sound confusing, so I'll describe what I'm looking to accomplish in a case based scenario, with steps:
User visits application
Thread starts
Until the thread finishes, that user's server instance hangs
Once the...
How do these relate?
Please use all of these words in one paragraph. I'm a beginner.
...
Hello All,
i want to get list of all application or Threads attached with a process.For example when we open different window all run with explorer.exe or we open different window of mozila all are in firefox.exe.
i have to check that if a window is all ready open no need to open this.and if it is in background or minimized then then ac...
Hi,
I'm developing an adding for office powerpoint application.
I'm trying to display a description of the object(Customized object) currently dropped on the powerpoint slide in design mode(Design mode of the powerpoint).
When i click on my addin the related object description will be displayed on a tabbed window as the first tabpage.
T...
I've been reading a lot about how Scala and Erlang does lightweight threads and their concurrency model (actors).
However, I have my doubts.
Do Scala and Erlang use an approach similar to the old thread model used by Java (green threads) ?
For example, suppose that there is a machine with 2 cores, so the Scala/Erlang environment will ...
How can I Submit client side computer user's answers(to a multiple choice question) to the server using JAVA
I have a centralized server and about 1000 client systems.
In these 1000 systems students take multiple choice quiz at at time (in some 2 hrs time).
Now i've to send all these answers of these questions to the server in an asyn...
Hi,
I'm tearing my hair out trying to solve this one, any insights will be much appreciated:
I have a C++ exe which acquires data from some hardware in the main thread and processes it in another thread (thread 2).
I use a c++ dll to supply some data processing functions which are called from thread 2.
I have a requirement to make ano...
Hello there,
I have a web application which runs multiple threads on button click each thread making IO call on different ipAddresses ie(login windows account and then making file operations). There is a treshold value of 30 seconds. I assume that while login attempt if the treshold is exceeded, device on ipAddress does not match my con...
Hi
In previous question of mine, someone had meantioned that using Semaphores were expensive in C# compared to using a monitor. So I ask this, how can I replace the semaphore in this code with a monitor?
I need function1 to return its value after function2 (in a separate thread) has been completed. I had replaced the Semaphore.WaitOne ...
public class PlayText extends Thread {
private int duration;
private String text;
private PlayerScreen playerscrn;
public PlayText(String text, int duration) {
this.duration = duration;
this.text = text;
this.playerscrn = (PlayerScreen)UiApplication.getUiApplication().getActiveScreen();
}
...
My program has two threads:
Main execution thread that handles user input and queues up database writes
A utility thread that wakes up every second and flushes the writes to the database
Inside the main thread, I occasionally need to make reads on the database. When this happens, performance is not important, but correctness is. (I...
For C-based implementations of ruby 1.8 and ruby 1.9, is File#print atomic when it is given multiple arguments?
...
I need to upload multiple files from directory to the server via FTP and SFTP.
I've solved this task for SFTP with python, paramiko and threading. But I have problem with doing it for FTP. I tried to use ftplib for python, but it seems that it doesn't support threading and I upload all files one by one, which is very slow.
I'm wonderin...
when click the grid item, i want to show a progressbar between the time of next Activity shown. then the second activity has a custom listview. there also i want to show a progressbar. how to do that?
...
I have a simple client-server program written in Qt, where processes communicate using MPI. The basic design I'm trying to implement is the following:
The first process (the "server") launches a GUI (derived from QMainWindow), which listens for messages from the clients (using repeat fire QTimers and asynchronous MPI receive calls), up...
class Name implements Runnable {
public void run() {
for (int x = 1; x <= 3; x++) {
System.out.println("Run by "
+ Thread.currentThread().getName()
+ ", x is " + x);
}
}
}
public class Threadtest {
public static void main(String [] args)...
I have the following method :
public List<string> someMethod()
{
// populate list of strings
// dump them to csv file
//return to output
}
Question is: i dont want the user to wait for csv dump, which might take a while.
If i use a thread for csvdump, will it complete? before or after the return of output?
After csvdump is ...
I have a worker thread in a class that is owned by a ChildView. (I intend to move this to the Doc eventually.) When the worker thread completes a task I want all the views to be updated. How can I make a call to tell the Doc to issue an UpdateAllViews()? Or is there a better approach?
Thank you.
Added by OP: I am looking for a simple...
Hello, I wonder if anyone can help me to understand where I could be going wrong with this code; Basically I'm working on a tutorial and calling the class below from another class - and it is getting the following error;
Exception in thread "Thread-1" java.lang.NullPointerException
at org.newdawn.spaceinvaders.TCPChat.run(TCPChat.ja...
I would like to create comprehensive checklist for Java low latency application. Can you add your checklist here?
Here is my list
1. Make your objects immutable
2. Try to reduce synchronized method
3. Locking order should be well documented, and handled carefully
4. Use profiler
5. Use Amdhal's law, and find the sequential execution pat...