Hi,
i am on developing Sound Recording applet.Here is the code
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
import java.io.IOException;
import java.io.File;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.TargetDataLine;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioSystem;...
Hi,
I'm working on an app right now that was working fine until I started implementing some threading for background loading of images. Now theres no crashes but the keyboard does not display. That is to say its invisible (I can still type, I just cant see the actual keyboard).
The only thing I've done was implement threading so I'm won...
I've got a requirement for a list in Java with a fixed capacity but which always allows threads to add items to the start. If it's full it should remove an item from the end to make space. No other process will remove items, but other processes will wish to iterate over the items.
Is there something in the JDK which would allow me to ...
When a thread is canceled via Thread.Abort() a ThreadAbortException is thrown inside the Thread Thread.Abort was called on. This leads the thread to immediately stop its work and the exception bubbles up the call stack until it leaves the thread's main method. This causes the thread to be aborted.
What are the benefits of an ExceptionHa...
Just wondering, is there any Multithreading framework out there?
Currently I am developing a WinForm application using Microsoft Enterprise Library framework. In this application I want to add threading functionality when running processes, so I can offload processes that I want to a separate thread. Moreover, I need to be able to monit...
Know that either java-version or python-version it doesn't support threading or processes. So if I want to execute a small snippet periodically in GAE, is there any possibility?
Oh, I'm just finding there is a document mentioned about it:
http://code.google.com/appengine/docs/java/config/cron.html
...
I have a serial application that I parallelized using OpenMP. I simply added the following to my main loop :
#pragma omp parallel for default(shared)
for (int i = 0; i < numberOfEmitters; ++i)
{
computeTrajectoryParams* params = new computeTrajectoryParams;
// defining params...
outputs[i] = (int*) ComputeTrajectory(params...
Hello,
I'm writing an multi-threaded app which will live on two active-active load balanced servers and access a clustered database on another server. Obviously I don't want multiple threads writing to the same records at the same time and SQL provides locking to ensure this doesn't happen. What are the advantages and disadvantages of u...
I'm trying to configure log4net with Unity, but I don't think I fullu understand what needs to be done.
In particular I can't figure how to log the %thread such that it logs the name of the class.
I created a MyLog4Net : ILogger class, but I don't get how I pass this class the calling class and how this relates to the logger name in th...
how to cancel background worker after specified time in c# or cancel not responding background worker.
...
When the program starts, a new JFrame is created. Once the user clicks the start button a thread is created and started. Part of this threads execution is to validate the data on the form and then execute with that data. Once the data has been validated the thread calls dispose() on the original frame and then creates a new JFrame that a...
I consider myself aware of the concepts of threading and why certain code is or isn’t “thread-safe,” but as someone who primarily works with ASP.NET, threading and thread safety is something I rarely think about. However, I seem to run across numerous comments and answers (not necessarily for ASP.NET) on Stack Overflow to the effect of “...
Hi
I'm building a single window WPF application
In the window is a list items (which are persisted in a database of course)
Periodically I need to start a background task that updates the database from an Atom feed. As each new item is added to the database, the list in the UI must also update to reflect this. I don't want this backgrou...
I have this code for a custom class 'sau_timer':
sau_timer::sau_timer(int secs, timerparam f, vector<string> params) : strnd(io),
t(io, boost::posix_time::seconds(secs))
{
assert(secs > 0);
this->f = f;
this->params = params;
t.async_wait(strnd.wrap(boost::bind(&sau_timer::exec, this, _1)));
boost::thread thrd(b...
I would like to start a long-running command-line process in my Grails application, log each line of output to the console when it arrives, and do other stuff asynchronously, while the process and logging activities keep going. (At some point, I'll want to do something else with each line of output, like log to a file or look for certain...
Im just learning OpenCL and im at the point when trying to launch a kernel. Why is it that the GPU threads are managed in a grid? I'm going to read more about this in detail but it would be nice with a simple explanation. Is it allways like this when working with GPGPU's?
...
I have a Winform app which lists a batch of invoices in a gridview. The users select the batch and clicks a button, "Generate Invoices". The process takes about 4-5 mins. While this is running I will have a marquee progress bar and would like to disable all buttons.
Should I use a BackgroundWorker Process or create a new thread to run ...
I am using log4net in a class with multiple threads and I had a simple question. Do I need to enter readlock/writelock when checking properties and calling methods on the log4net.ILog interface?
I am using the suggested method from the log4net examples so at the top of said class I have:
Private Shared ReadOnly log As log4net.ILog = ...
I am writing a C# application.
I have (a kind of) logging class. and this logging class will be used by many threads.
How to make this class thread safe?
Should I make it as singleton?
what are the best practices there?
Is there a document that I can read about how to make it thread-safe?
Thanks
...
We are implementing a C# application that needs to make large numbers of socket connections to legacy systems. We will (likely) be using a 3rd party component to do the heavy lifting around terminal emulation and data scraping. We have the core functionality working today, now we need to scale it up.
During peak times this may be tho...