【发布时间】:2011-09-21 12:22:32
【问题描述】:
class ...
{
onClick()
{
while(true)
{
//call the thread from here
threadpool(request)//send request to thread using thread pool
}
}
//the function for thread
threadfunction()//function that thread calls
{
// I am not able to change the textbox/datagridview in windowsform from here the main ui gets stuck //
}
}
我不想更改上述逻辑是否可以从函数到线程同时更新数据网格,因为我的程序卡住了。
【问题讨论】:
-
请显示真实代码,而不是您在此处提供的伪代码。阅读tinyurl.com/so-hints
-
我认为我们需要查看 很多 更多代码,然后才能诊断此代码。 “线程的函数”到底是怎么写的?
标签: c# .net multithreading windows-applications