» Home » thread » Page 1
C# Basic Multi-Threading Question: Call Method on Thread A from Thread B (Thread B started from Thread A)
Category : Development Tools & Services

What is the best way to accomplish this: The main thread (Thread A) creates two other threads (Thread B and Thread C). Threads B and C do heavy disk I/O and eventually need to pass in resources they created to Thread A to then call a method in an external DLL file which requires the thread that created it to be called correctly so only Thread A can call it.


The only other time I eve


View Replies


how to solve this problme == Cross-thread operation not valid: Control 'frm_proc' accessed from a thread other than the thread it was created
Category : Programming Languages

i have a from On this form i have a button...
on the click event write this code


_BackgroundWorker.RunWorkerAsync(new MethodInvoker(() =>
{
progressBar1.BeginInvoke(new MethodInvoker(() => progressBar1.Visible = true));
Print formp = new Print();
formp.ShowDialog();
th

View Replies


c# - Progress Bar [Threading] Cross-thread operation not valid: Control 'progressBar' accessed from a thread other than the thread it was crea
Category : Programming Languages

I am stuck with the above issue. I got lot of solutions but none of them working for me.
Please find herewith my code


private void btnRunQuery_Click(object sender, EventArgs e)
{
try
{
Thread ProcessThread = new Thread(Process);
ProcessThread.Start();
Thread.CurrentThread.Join();

View Replies


Does an asynchronous call require an extra thread in the current process or use another thread in a thread pool?
Category : Programming Languages

I'm referring to this answer where it says it's not required, there are few specific assumptions though. That question is general.


I'm using C#
Asynchronous process is doing nothing but just calling an external API and waiting for the reply.

View Replies


How can I wait for a thread to finish running?Thread.join is making my main thread non responsive?
Category : Programming Languages

I'm working on project which sends mails to multiple users using windows application,But what is happening is,when I use Thread.Join() Method it is making my Main UI non-responsive......
What I want is.... I want to run SMTPClienTSetting() method on seperate thread and want my Main UI to remain responsive for other work..I wnat to run this mail sending acvtivity at the background...Please


View Replies


Cross-thread operation not valid: Control 'rchsdtOut' accessed from a thread other than the thread it was created on
Category : Programming Languages

So I am getting this cross thread error and I cannot figure it out. Here is my base code before I attempted to muck around with it.


Bascally what the code is going is calling a batch file which then calls a java file. The outputdata is then redirected to the console in real time. When I just redirect the output just to the C# console, it works fine. But I want the same info to p


View Replies


Cross-thread operation not valid; control 'listview1' acccessed from a thread other than the thread I use in progress bar
Category : Programming Languages

I am getting this error..


I was trying to do progress bar that process database insert method with more than 1000 record. I need the progress bar to load exactly the same process in threading..


I got the error in; cross-threading operation not valid; control 'listview1' accessed from a thread other than the thread it was created on.


Imports System.IO
View Replies


Java Multithreading: Does the thread on which an objects method is executed depend on the thread on the thread in which it is created?
Category : Programming Languages

Does the thread on which an objects method is executed depend on the thread on the thread in which it is created?


Imagine you have two threads in your java applications Thread1 and Thread2 and two classes ClassA and ClassB.


You create an ObjectOfClassA on Thread1 then you create and ObjectOfClassB on Thread2, the ObjectOfClassB contains a reference to the ObjectOfClassA


View Replies


Cross-thread operation not valid: Control 'listBox2' accessed from a thread other than the thread it was created on
Category : Programming Languages

after entering some text in textbox control (C# window application)and pressing button it will raise two events one is button click and another is my application defined event. im not able to catch the event. and im getting this error. how to solve this ... pls help..


View Replies


How do I pause execution of a thread in a thread pool for a certain amount of time without blocking the thread entirely?
Category : Programming Languages

What I have is something similar to this:


//method being called by thread pool thread
public string someFunction(){
string someString = "string";
//Stuff happens
//Need to wait for 5 seconds without blocking thread
return someString;
}

The issue is that I need the result of that method returned to the method that


View Replies


Next
2012 / 2017 Copyrights BigHow , All Rights Reserved .