Click here to Skip to main content
16,006,065 members
Home / Discussions / C#
   

C#

 
GeneralRe: Transparent Panel Pin
Heath Stewart30-Sep-04 6:50
protectorHeath Stewart30-Sep-04 6:50 
Generalword formatting bar Pin
RomanD30-Sep-04 5:15
RomanD30-Sep-04 5:15 
GeneralRe: word formatting bar Pin
Dave Kreskowiak30-Sep-04 5:57
mveDave Kreskowiak30-Sep-04 5:57 
GeneralRe: word formatting bar Pin
RomanD30-Sep-04 6:09
RomanD30-Sep-04 6:09 
GeneralRe: word formatting bar Pin
Dave Kreskowiak30-Sep-04 7:21
mveDave Kreskowiak30-Sep-04 7:21 
GeneralUser clicks on dataGrid.... Pin
JDUK30-Sep-04 4:27
JDUK30-Sep-04 4:27 
GeneralRe: User clicks on dataGrid.... Pin
MarkMokris30-Sep-04 5:16
MarkMokris30-Sep-04 5:16 
GeneralDelegates, asynchronous invocation Pin
Serge Lobko-Lobanovsky30-Sep-04 3:52
Serge Lobko-Lobanovsky30-Sep-04 3:52 
Hi everyone,

I've been stuck with this problem for several days already. My code extensively uses asynchronous delegate invocation using the Delegate.BeginInvoke method. The general pattern is as follows:

Scheduler or UI thread:
1) BeginInvoke function 1

First function:
1) prepare data
2) BeginInvoke data processing passing CurrentThread (see below)
3) CurrentThread.Suspend
4) (after resume) go to step 1 with new data processing command, if all commands are executed, exit

Data processing:
0) get calling thread (passed in parameters)
1) process data
2) set result
3) resume calling thread

Several data processing commands (Command pattern) require asynchronous calls, too. That is that BeginInvoke method is called from inside another method which was called using BeginInvoke, too. What I've noticed so far is that sometimes the delegate being BeginInvoke'd is NOT CALLED AT ALL! To give more evidence, I have a special Logger class which sends messages to a text box. Apparently, it uses Control.BeginInvoke to correctly dispatch Text property changes. Sometimes again the function specified in MethodInvoker delegate is also NOT CALLED AT ALL!

What could be the problem? I honestly hope it is not a bug in the framework, as the project is (and has been for the last month) in the final stage.


Regards,
Serge (Logic Software, Easy Projects .NET site)
GeneralRe: Delegates, asynchronous invocation Pin
Dave Kreskowiak30-Sep-04 5:29
mveDave Kreskowiak30-Sep-04 5:29 
GeneralRe: Delegates, asynchronous invocation Pin
Serge Lobko-Lobanovsky30-Sep-04 6:09
Serge Lobko-Lobanovsky30-Sep-04 6:09 
GeneralMDi question Pin
IronSnake30-Sep-04 2:38
IronSnake30-Sep-04 2:38 
GeneralRe: MDi question Pin
benjymous30-Sep-04 2:49
benjymous30-Sep-04 2:49 
GeneralRe: MDi question Pin
IronSnake30-Sep-04 3:05
IronSnake30-Sep-04 3:05 
GeneralRe: MDi question Pin
benjymous30-Sep-04 3:10
benjymous30-Sep-04 3:10 
Generalimage buttons Pin
pat27088130-Sep-04 1:54
pat27088130-Sep-04 1:54 
Generalgreeting screen Pin
pat27088130-Sep-04 1:52
pat27088130-Sep-04 1:52 
GeneralRe: greeting screen Pin
benjymous30-Sep-04 2:40
benjymous30-Sep-04 2:40 
GeneralRemoving access control entry Pin
vcorn30-Sep-04 1:50
vcorn30-Sep-04 1:50 
GeneralRe: Removing access control entry Pin
Gavin Jeffrey30-Sep-04 20:21
Gavin Jeffrey30-Sep-04 20:21 
GeneralComboBoxes & DataTables Pin
JDUK30-Sep-04 1:22
JDUK30-Sep-04 1:22 
GeneralRe: ComboBoxes & DataTables Pin
Jon G30-Sep-04 1:32
Jon G30-Sep-04 1:32 
GeneralRe: ComboBoxes & DataTables Pin
Gavin Jeffrey30-Sep-04 3:11
Gavin Jeffrey30-Sep-04 3:11 
GeneralNewbie needs simple example Pin
sween330-Sep-04 0:58
sween330-Sep-04 0:58 
GeneralRe: Newbie needs simple example Pin
Corinna John30-Sep-04 1:38
Corinna John30-Sep-04 1:38 
GeneralRe: Newbie needs simple example Pin
sween330-Sep-04 4:31
sween330-Sep-04 4:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.