Search Results

Search found 5817 results on 233 pages for 'multi threading'.

Page 3/233 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • boot.ini Issue - Multi-boot System, Linux, XP and XP64 - Missing File in system32 Message

    - by nicorellius
    I have an interesting issue that has me stumped. Not that I'm a computer whiz or anything. I have a multi-boot system with two hard drives: one drive has CentOS and Windows XP 64-bit and the other drive has Windows XP 32-bit. CentOS grub boot loader works great, and I have it set to default to Windows. But this is the problem. My boot.ini file seems to be in order, yet it still gives an error if I choose the default OS (which, consequently, is XP32): Windows could not start because the following file is missing or corrput: (Windows root) \system32\ntoskrnl.exe. Please re-install a copy of the above file. But if I choose the actual boot ID, i.e., toggle to the Windows XP Pro selection it boots just fine. In the boot.ini file, the entry for XP 32 is the samee: [boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows XP Pro" /noexecute=optin /fastdetect /usepmtimer [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows XP Pro" /noexecute=optin /fastdetect /usepmtimer multi(0)disk(0)rdisk(1)partition(2)\WINDOWS="Windows XP Pro x64" /noexecute=optin /fastdetect /usepmtimer What am I missing?

    Read the article

  • SIlverlight 4RC threading - can a new Thread return the UI Thread

    - by Darko Z
    Hi all, Let's say I have a situation in Silverlight where there is a background thread (guaranteed to NOT be the UI thread) doing some work and it needs to create a new thread. Something like this: //running in a background thread Thread t = new Thread(new ThreadStart(delegate{}); t.Start(); Lets also say that the UI thread at this particular time is just hanging around doing nothing. Keeping in mind that I am not that knowledgeable about the Silverlight threading model, is there any danger of the new Thread() call giving me the UI thread? The motivation or what I am trying to achieve is not important - I do not want modification to the existing code. I just want to know if there is a possibility of getting the UI thread back unexpectedly. Cheers

    Read the article

  • System.Threading.Tasks - Limit the number of concurrent Tasks

    - by James
    I have just started to look at the new "System.Threading.Tasks" goodness in .Net 4.0, and would like to know if there is any build in support for limiting the number of concurrent tasks that run at once, or if this should be manually handled. E.G: If I need to call a calculation method 100 times, is there a way to set up 100 Tasks, but have only 5 execute simultaneously? The answer may just be to create 5 tasks, call Task.WaitAny, and create a new Task as each previous one finishes. I just want to make sure I am not missing a trick if there is a better way to do this. Thanks for any help.

    Read the article

  • C# threading pattern that will let me flush

    - by Jeff Alexander
    I have a class that implements the Begin/End Invocation pattern where I initially used ThreadPool.QueueUserWorkItem() to do thread my work. I now have the side effect where someone using my class is calling the Begin (with callback) a ton of times to do a lot of processing so ThreadPool.QueueUserWorkItem is creating a ton of threads to do the processing. That in itself isn't bad but there are instances where they want to abandon the processing and start a new process but they are forced to wait for their first request to finish. Since ThreadPool.QueueUseWorkItem() doesn't allow me to cancel the threads I am trying to come up with a better way to queue up the work and maybe use an explicit FlushQueue() method in my class to allow the caller to abandon work in my queue. Anyone have any suggestion on a threading pattern that fits my needs?

    Read the article

  • Threading multiple WebBrowser in VB .net

    - by Code_Seeker
    I'm building a multiple webbrowser inside tabs( 1 predefine webbrowser control per tab) and I want them all to load at the same time or other words must run in thread. Unfortunately I feel a valid fact came from the error message that this is something not possible. Pls help me to check my simple program code below and its error in case i tried releasing 2 webbrowser controls but when I leave it to single web browser control it works fine. Any workaround? Imports System.Threading Public Class Form1 Dim mythread1 As Thread Dim mythread2 As Thread Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load mythread1 = New Thread(AddressOf mysub1) mythread2 = New Thread(AddressOf mysub2) mythread1.IsBackground = True mythread2.IsBackground = True mythread1.Start() mythread2.Start() End Sub Public Sub mysub1() Dim HTML As String WebBrowser1.Navigate("about:blank") mythread1.Abort() End Sub Public Sub mysub2() WebBrowser2.Navigate("about:blank") mythread2.Abort() End Sub

    Read the article

  • Python Threading, loading one thread after another

    - by Michael
    Hi, I'm working on a media player and am able to load in a single .wav and play it. As seen in the code below. foo = wx.FileDialog(self, message="Open a .wav file...", defaultDir=os.getcwd(), defaultFile="", style=wx.FD_MULTIPLE) foo.ShowModal() queue = foo.GetPaths() self.playing_thread = threading.Thread(target=self.playFile, args=(queue[0], 'msg')) self.playing_thread.start() But the problem is, when I try to make the above code into a loop for multiple .wav files. Such that while playing_thread.isActive == True, create and .start() the thread. Then if .isActive == False, pop queue[0] and load the next .wav file. Problem is, my UI will lock up and I'll have to terminate the program. Any ideas would be appreciated.

    Read the article

  • System.Threading.ThreadstateException

    - by Yasindu
    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. There is a button on the tab page, and when i click on it i need the description to get copied to windows clipboard. I tried this using clipboardclass it throws the following exception, System.Threading.ThreadstateException {"Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it."} Code for clipboard: Clipboard.Clear() Clipboard.SetText(lblObjectID.Text) I searched the net for a solution and got couple of answers like, 1. Put [STAThread] in the main function 2. Thread.CurrentThread.SetApartmentState(ApartmentState.STA) Immediately before your call to SetDataObject. But I'm not sure where to put the 1st one and the 2nd option didn't work. Can anyone help me please. Thanks.

    Read the article

  • Threading Practice with Polling.

    - by Stacey
    I have a C# application that has to constantly read from a program; sometimes there is a chance it will not find what it needs, which will throw an exception. This is a limitation of the program it has to read from. This frequently causes the program to lock up as it tries to poll. So I solved it by spawning the 'polling' off into a separate thread. However watching the debugger, the thread is created and destroyed each time. I am uncertain if this is typical or not; but my question is, is this good practice, or am I using the threading for the wrong purpose? ProgramReader { static Thread oThread; public static void Read( Program program ) { // check to see if the program exists if ( false ) oThread = new ThreadStart(program.Poll); if(oThread != null || !oThread.IsAlive ) oThread.Start(); } } This is my general pseudocode. It runs every 10 seconds or so. Is this a huge hit to performance? The operation it performs is relatively small and lightweight; just repetitive.

    Read the article

  • .NET threading solution for long queries

    - by Eddie
    Senerio We have an application that records incidents. An external database needs to be queried when an incident is approved by a supervisor. The queries to this external database are sometimes taking a while to run. This lag is experienced through the browser. Possible Solution I want to use threading to eliminate the simulated hang to the browser. I have used the Thread class before and heard about ThreadPool. But, I just found BackgroundWorker in this post. MSDN states: The BackgroundWorker class allows you to run an operation on a separate, dedicated thread. Time-consuming operations like downloads and database transactions can cause your user interface (UI) to seem as though it has stopped responding while they are running. When you want a responsive UI and you are faced with long delays associated with such operations, the BackgroundWorker class provides a convenient solution. Is BackgroundWorker the way to go when handling long running queries? What happens when 2 or more BackgroundWorker processes are ran simultaneously? Is it handled like a pool?

    Read the article

  • Displaying progressbar using threading in win 32 applicaition!

    - by kiddo
    In my application I have a simple module were I will read files for some process that will take few seconds..so I thought of displaying a progress bar(using worker thread) while the files are in progress.I have created a thread (code shown below) and also I designed a dialog window with progress control.I used the function MyThreadFunction below to display the progressbar but it just shows only one time and disappears,I am not sure how to make it work.I tried my best inspite of the fact that I am new to threading. reading files void ReadMyFiles() { for(int i = 0; i < fileCount ; fileCount++) { CWinThread* myThread = AfxBeginThread((AFX_THREADPROC)MyThreadFunction,NULL); tempState = *(checkState + index); if(tempCheckState == NOCHECKBOX) { //my operations } else//CHECKED or UNCHECKED { //myoperation } myThread->PostThreadMessage(WM_QUIT,NULL,NULL); } } thread functions UINT MyThreadFunction(LPARAM lparam) { HWND dialogWnd = CreateWindowEx(0,WC_DIALOG,L"Proccessing...",WS_OVERLAPPEDWINDOW|WS_VISIBLE, 600,300,280,120,NULL,NULL,NULL,NULL); HWND pBarWnd = CreateWindowEx(NULL,PROGRESS_CLASS,NULL,WS_CHILD|WS_VISIBLE|PBS_MARQUEE,40,20,200,20, dialogWnd,(HMENU)IDD_PROGRESS,NULL,NULL); MSG msg; PostMessage( pBarWnd, PBM_SETRANGE, 0, MAKELPARAM( 0, 100 ) ); PostMessage(pBarWnd,PBM_SETPOS,0,0); while(PeekMessage(&msg,NULL,NULL,NULL,PM_NOREMOVE)) { if(msg.message == WM_QUIT) { DestroyWindow(dialogWnd); return 1; } AfxGetThread()->PumpMessage(); Sleep(40); } return 1; }

    Read the article

  • Threading.Timer invokes asynchronously many methods

    - by Dimitar
    Hi guys! Please help! I call a threading.timer from global.asax which invokes many methods each of which gets data from different services and writes it to files. My question is how do i make the methods to be invoked on a regular basis let's say 5 mins? What i do is: in Global.asax I declare a timer protected void Application_Start() { TimerCallback timerDelegate = new TimerCallback(myMainMethod); Timer mytimer = new Timer(timerDelegate, null, 0, 300000); Application.Add("timer", mytimer); } the declaration of myMainMethod looks like this: public static void myMainMethod(object obj) { MyDelegateType d1 = new MyDelegateType(getandwriteServiceData1); d1.BeginInvoke(null, null); MyDelegateType d2 = new MyDelegateType(getandwriteServiceData2); d2.BeginInvoke(null, null); } this approach works fine but it invokes myMainMethod every 5 mins. What I need is the method to be invoked 5 mins after all the data is retreaved and written to files on the server. How do I do that?

    Read the article

  • C# threading solution for long queries

    - by Eddie
    Senerio We have an application that records incidents. An external database needs to be queried when an incident is approved by a supervisor. The queries to this external database are sometimes taking a while to run. This lag is experienced through the browser. Possible Solution I want to use threading to eliminate the simulated hang to the browser. I have used the Thread class before and heard about ThreadPool. But, I just found BackgroundWorker in this post. MSDN states: The BackgroundWorker class allows you to run an operation on a separate, dedicated thread. Time-consuming operations like downloads and database transactions can cause your user interface (UI) to seem as though it has stopped responding while they are running. When you want a responsive UI and you are faced with long delays associated with such operations, the BackgroundWorker class provides a convenient solution. Is BackgroundWorker the way to go when handling long running queries? What happens when 2 or more BackgroundWorker processes are ran simultaneously? Is it handled like a pool?

    Read the article

  • Java Threading Concept Understanding

    - by Nirmal
    Hello All... Recently I have gone through with one simple threading program, which leads me some issues for the related concepts... My sample program code looks like : class NewThread implements Runnable { Thread t; NewThread() { t = new Thread(this, "Demo Thread"); System.out.println("Child thread: " + t); t.start(); // Start the thread } public void run() { try { for (int i = 5; i > 0; i--) { System.out.println("Child Thread: " + i); Thread.sleep(500); } } catch (InterruptedException e) { System.out.println("Child interrupted."); } System.out.println("Exiting child thread."); } } class ThreadDemo { public static void main(String args[]) { new NewThread(); // create a new thread try { for (int i = 5; i > 0; i--) { System.out.println("Main Thread: " + i); Thread.sleep(1000); } } catch (InterruptedException e) { System.out.println("Main thread interrupted."); } System.out.println("Main thread exiting."); } } Now this program giving me the output as follows : Child thread: Thread[Demo Thread,5,main] Main Thread: 5 Child Thread: 5 Child Thread: 4 Main Thread: 4 Child Thread: 3 Child Thread: 2 Main Thread: 3 Child Thread: 1 Exiting child thread. Main Thread: 2 Main Thread: 1 Main thread exiting. So, that's very much clear to me. But as soon as I am replacing the object creation code (calling of a NewThread class constructor) to as follows : NewThread nt = new NewThread(); // create a new thread the output becomes a bit varied like as follows : Child thread: Thread[Demo Thread,5,main] Main Thread: 5 Child Thread: 5 Child Thread: 4 Child Thread: 3 Main Thread: 4 Child Thread: 2 Child Thread: 1 Main Thread: 3 Exiting child thread. Main Thread: 2 Main Thread: 1 Main thread exiting. And some times it's giving me same output in both the cases. So, i am not getting the exact change in both the scenario. I would like to know that you the variation in the output is coming here ? Thanks in advance...

    Read the article

  • Surprising results with .NET multi-theading algorithm

    - by Myles J
    Hi, I've recently wrote a C# console time tabling algorithm that is based on a combination of a genetic algorithm with a few brute force routines thrown in. The initial results were promising but I figured I could improve the performance by splitting the brute force routines up to run in parallel on multi processor architectures. To do this I used the well documented Producer/Consumer model (as documented in this fantastic article http://www.albahari.com/threading/part2.aspx#_ProducerConsumerQWaitHandle). I changed my code to create one thread per logical processor during the brute force routines. The performance gains on my work station were very pleasing. I am running Windows XP on the following hardware: Intel Core 2 Quad CPU 2.33 GHz 3.49 GB RAM Initial tests indicated average performance gains of approx 40% when using 4 threads. The next step was to deploy the new multi-threading version of the algorithm to our higher spec UAT server. Here is the spec of our UAT server: Windows 2003 Server R2 Enterprise x64 8 cpu (Quad-Core) AMD Opteron 2.70 GHz 255 GB RAM After running the first round of tests we were all extremely surprised to find that the algorithm actually runs slower on the high spec W2003 server than on my local XP work station! In fact the tests seem to indicate that it doesn't matter how many threads are generated (tests were ran with the app spawning between 2 to 32 threads). The algorithm always runs significantly slower on the UAT W2003 server? How could this be? Surely the app should run faster on a 8 cpu (Quad-Core) than my 2 Quad work station? Why are we seeing no performance gains with the multi-threading on the W2003 server whilst the XP workstation tests show gains of up to 40%? Any help or pointers would be appreciated. Regards Myles

    Read the article

  • Múltiples clientes en el mismo Oracle UCM

    - by [email protected]
    Estamos muy activos con la implantación de plataformas ECM que den servicio a múltiples clientes. Consiguiendo 2 objetivos muy importantes:El cliente final puede pagar al proveedor por una plataformas ECM como servicio (SaaS). Y, lógicamente, se ahorra en complejidad y gastos de infraestructura, administración, formación, almacenamiento, etc...Hemos estado explicando estos días el modelo Master-Proxy de Oracle UCM con el que podemos implantar este tipo de plataformas. No siempre será la solución más adecuada porque a veces vamos a querer disponer de plataformas compartidas, pero con clientes completamente aislados. Siempre, la consola de migración nos permite exportar e importar componentes, metadatos, contenidos, workflows, etc... para que elijamos el modelo más adecuado para cada caso.Pero, ¿Cómo funciona?. Podéis ver en la imágen que se basa en la instalación de varias instancias de UCM y configurarlas de forma que varias de ellas se comporten como "Master" (digo varias para conseguir alta disponibilidad), y el resto se comporten como "Proxy" (también varias instancias de UCM pueden comportarse como un mismo "Proxy" permitiendo balancear la carga en función de que cada cliente requiera más o menos rendimiento). Esta configuración (que vemos en la imágen adjunta), nos permite:Delegar la gestión de usuarios de cada cliente. Los usuarios del Master podrán acceder a todos los Proxies, pero los usuarios de cada proxy sólo acceden a su repositorio.Delegar funcionalidad y componentes. Es posible configurar diferentes funcionalidades en cada proxy de forma que algunos servidores estén especializados en Web Content Management, otros en Document Management (por ejemplo).Diferentes modelos de metadatos. Podemos modelar unos tipos documentales generales para toda la plataforma y otros particulares diferentes en cada UCM "Proxy".Conseguir una centralización de búsquedas y acceso a repositorios de documentación con diferentes juegos de caracteres. Un UCM Master puede centralizar la búsqueda en UCM's proxy que alberguen documentación en diferentes juegos de caracteres (por ejemplo un UCM para documentación de idiomas "Western European" (inglés, español, francés, alemán,...) y otro UCM proxy bajo juego de caracteres "Asian" (japones, coreano, chino,...).Fuentes:Toda la información detallada se encuentra en la documentación de Oracle UCM, aquí:http://download.oracle.com/docs/cd/E10316_01/ouc.htmY en concreto, lo relativo a plataformas, en el documento "Planning and Implementation Guide", aquí:plan_implement_guide_10en.pdf

    Read the article

  • Caveats to be aware of when using threading in Python?

    - by knorv
    I'm quite new to threading in Python and have a couple of beginner questions. When starting more than say fifty threads using the Python threading module I start getting MemoryError. The threads themselves are very slim and not very memory hungry, so it seems like it is the overhead of the threading that causes the memory issues. Is there something I can do to increase the memory capacity or otherwise make Python allow for a larger number of threads? What is the maximum number of threads you've been able to run in your Python code using the threading module? Did you do any tricks to achieve that number? Are there any other caveats to be aware of when using the threading module?

    Read the article

  • Threading 101: What is a Dispatcher?

    - by Water Cooler v2
    Once upon a time, I remembered this stuff by heart. Over time, my understanding has diluted and I mean to refresh it. As I recall, any so called single threaded application has two threads: a) the primary thread that has a pointer to the main or DllMain entry points; and b) For applications that have some UI, a UI thread, a.k.a the secondary thread, on which the WndProc runs, i.e. the thread that executes the WndProc that recieves messages that Windows posts to it. In short, the thread that executes the Windows message loop. For UI apps, the primary thread is in a blocking state waiting for messages from Windows. When it recieves them, it queues them up and dispatches them to the message loop (WndProc) and the UI thread gets kick started. As per my understanding, the primary thread, which is in a blocking state, is this: C++ while(getmessage(/* args &msg, etc. */)) { translatemessage(&msg, 0, 0); dispatchmessage(&msg, 0, 0); } C# or VB.NET WinForms apps: Application.Run( new System.Windows.Forms() ); Is this what they call the Dispatcher? My questions are: a) Is my above understanding correct? b) What in the name of hell is the Dispatcher? c) Point me to a resource where I can get a better understanding of threads from a Windows/Win32 perspective and then tie it up with high level languages like C#. Petzold is sparing in his discussion on the subject in his epic work. Although I believe I have it somewhat right, a confirmation will be relieving.

    Read the article

  • Threading in C#.

    - by Harsha
    Hello All, I have created an array of threads and started all of them. How to know whether all threads have completed work. I don't want to use thread.wait or thread.join. Thanks in advance. -Harsha

    Read the article

  • Threading: problem with checkbox's visibility

    - by Manish
    In a C#.NET windows application I set the visibility of the checkbox to false: checkBoxLaunch.Visible = true; I started a thread. Thread th = new Thread(new ThreadStart(PerformAction)); th.IsBackground = true; th.Start(); The thread performs some stuff and sets the visibility to true private void PerformAction() { /* . .// some actions. */ checkBoxLaunch.Visible = true; } But after the thread finishes it's task, the check box is not visible to me.. :( What am I missing??

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >