priority

Java Threads priority in Linux

I have a multi thread application built on Java and I need to set different priorities to this threads. In windows it works fine, a bigger value (priority) gets more CPU time just like it was supposed. On Linux, I cant find a logical answer to how it is working. Looked online, but can't seem to find a definitive answer on how its worki...

Counting items of each priority level in an IBM MQ Series Queue

I have an IBM MQ series queue (running on Windows) containing many items of varying priority. I currently get a total depth count using mqQueue.CurrentDepth but I'd like to get a count of the number of items of each priority level within the queue. Any idea how to achieve this? ...

WCF Endpoint with Priority

I need WCF service with 3 endpoints High Normal Low Most of messages will come through Normal and Low Endpoints. If Message on High will appear it have to be processed asap. Does anyone knows how to do it ??? ...

Setting a thread priority in a service

Hello all, In my service I have a few threads that each call the CreateProcess() function to launch an external application. I would like to adjust thread (or process) priorities to normal or lower, depending on some other factors. The problem is that SetThreadPriority() function fails with an error 6 (invalid handle?). I'm passing in a...

How to change the priority of a thread in run time in windows?

I am writing a multi-thread application in windows OS. All threads are runing as services. If I want to change the priority of service in run time, how can I do this? Does windows provide any API? Many Thanks! ...

.Net Compact Framework - can I prevent garbage collector to stop some of my threads ?

Hi, I wonder if it is possible in a Compact Framework application to prevent the garbage collector to unconditionally stop at least one of the threads, or if it is possible to block GC collects at least in some portions of the code. I think it has to deal with setting real time priorities, but I found a lot of advices against doing it.....

Message processing with priorities

In a Java web application I have a recurring message load of type A (e.g., 20,000 every hour). Then I have a second type of messages (type B) that show up occasionally but have a higher priority than type A (say, 3,000). I want to be able to process these messages on one or more machines using open source software. It seems to me that...

Setting Print Queue Priority in Windows

I have some code that sends a text file to a printer as follows: File.Copy(outputFile, "\\" & printServer & "\" & printer) Is there a way I can specify the priority of the print job before it's sent to the printer? ...

How to change Listener Thread Priority in Indy

Hi all! I use the TIdCmdTCPServer component of Indy 10 to realize my client-server application. The problem is that the request from clients can be fairly complicated and that the GUI part of my server application immediately loses responsiveness. From the Indy Documentation i got that Indy Creates and starts listener threads for B...

Process Priority inheritance

Hi, imagine that you have a process A running with priority AboveNormal that starts another process B without specify the priority. Is the priority of the process B inherited from the priority of the process A? So, what will be the priority on the process B? AboveNormal, Normal or another? ...

Missing OpenMP feature: Thread Priority

Anyone think about it. OpenMP features to adjust cpu muscles to handle dumbbel. In my research for openmp we cannot set thread priority to execute block code with powerfull muscle. Only one way(_beginthreadex or CreateThread function with 5. parameters) to create threads with highest priority. Here some code for this issue: This is m...

Thread pool with dependency support?

Does anyone know of a thread-pool like implementation for .NET that supports the following features: dependencies between tasks task priorities sub-tasks Basically I'd like to throw a bunch of tasks at this pool, with some inter-dependencies (ie. make sure task A completes before task B is allowed to start). Priorities would be used...

PriorityQueue/Heap Update

Does Java have an easy way to reevaluate a heap once the priority of an object in a PriorityQueue has changed? I can't find any sign of it in Javadoc, but there has to be a way to do it somehow, right? I'm currently removing the object then re-adding it but that's obviously slower than running update on the heap. ...

Erlang: priority receive

Hello, Priority receive in Erlang can easily be implemented as follows: prio() -> receive {priority, X} -> X after 0 -> receive X -> X end end. I am reading a paper called Priority Messaging made Easy in which they describe the following problem: The main problem with the [code] example [above], is ...

sending messages over tcp with priority in C#

I am developing a chat protocol in C# and I want several types of messages sent on the same connections, for example, text and application(eg file transfer) messages. Because applications may easily fill the TCP buffer, text messages may have a big delay until they sent, so I want them to have a certain priority over other messages. //p...

WCF MSMQ priority

Is there any way to do priority settings with MSMQ using WCF. I know this might be a duplicate question so bear with me. I basically just need to give a low and a high priority. I am not really wanting to do 2 services as both of them would be doing the same. Any Ideas? ...

Retlang input prioritization

What is the preferred way, if any, to handle channel input in a prioritized fashion? Is there anything equivalent to Scala's "reactWithin(0) { ... case TIMEOUT }" construct? ...

CSS class priorities

Hi All, I have a question about the priority of CSS classes after encountering a problem today. The situation is as follows: I have an unordered list which has a class associated with it. The LI tags has some styles defined too. I want to change the styling of the LIs after a click (a "selected" class) but the added class's styles are...

Thread portability across Android Platforms

I understand that if you specify thread priorities other than the default in Java then it makes the program platform specific. If you were to create threads for an android application and modify the priorities then would the app platform specific across different android versions (i.e. Cupcake/Donut and modified versions of Android like...

Boost Priority pool sample?

Hi, I am working on a Boost thread pool. I have a structure like this: class SimThreadPool { static SimThreadPool* getInstance(); boost::threadpool::prio_pool& getThreadPool() { return mThreadPool; } simTerrain::SimThreadPool::SimThreadPool() : mThreadPool(boost::threadpool::fifo_pool(1)) { } boost::thre...