RE: [perl-win32-gui-users] Thread Safe Message Passing

2006-02-12 Thread Jeremy White
Yes, it is correct that it allows the main thread to communicate with the 
child threads via the Window Message Queue (though I am workin on a way to 
make it last beyond the Window's lifespan).


And techinically... no, sending data that way wont work quite yet...
 but that is the general idea in the end.


Sounds interesting.

I plan on moving things to a ThreadsSafe::SendMessage() form in order to 
allow lifespan of the children beyond that of the window message queue, as 
well as provide and *easy* way of transfering the data to that queue.




There is an issue with using the windows queue that you need to be aware off 
(you probably know this anyway, but I'm mentioning it just in case). On all 
versions of windows the queue can't grow beyond a fixed certain size, and in 
versions below XP, the windows queue is relatively small (in xp, the max 
queue size is 10,000). If the queue is full, messages just "disappear".



the format for sending message then would be more along ths lines of:

ThreadsSafe::SendMessage(MESSAGE, WPARAM, LPARAM[, DATA]);

the reference is a scalar/list/hash/storable object, that will be frozen by 
storable and then put on the destination threads's queue, where it will be 
sent over to the callback for that threads, in its original form via thaw.




This will work well, I do something similar in another project.

Cheers,

jez.





RE: [perl-win32-gui-users] Thread Safe Message Passing

2006-02-12 Thread Plum, Jason
>>I plan on moving things to a ThreadsSafe::SendMessage() form in order to 
>>allow lifespan of the children beyond that of the window message queue, as 
>>well as provide and *easy* way of transfering the data to that queue.


>There is an issue with using the windows queue that you need to be aware off 
>(you probably know this anyway, but I'm mentioning it just in case). On all 
>versions of windows the queue can't grow beyond a fixed certain size, and in 
>versions below XP, the windows queue is relatively small (in xp, the max 
>queue size is 10,000). If the queue is full, messages just "disappear".

Well, I guess I never stopped to consider a point where the main thread (the 
GUI with the window Queue) would ever reach a point where it HAD 10K entires. 
I've never managed to get it to have more than 15 at once, and that was becuase 
an operation was blocking...

The method I've worked out here doesn't leave the messages on the windows 
queue, but moves them to its own. This doesn't seem likely to occur (hitting 
the limit) but it is a possibility, logicly speaking.

>>the format for sending message then would be more along ths lines of:
>>
>>ThreadsSafe::SendMessage(MESSAGE, WPARAM, LPARAM[, DATA]);
>>
>>the reference is a scalar/list/hash/storable object, that will be frozen by 
>>storable and then put on the destination threads's queue, where it will be 
>>sent over to the callback for that threads, in its original form via thaw.
>>

>This will work well, I do something similar in another project.

>Cheers,

>jez.







[perl-win32-gui-users] Win32::GetOpenFileName problem

2006-02-12 Thread Igor Anufriyenko
Hello,
   
  Has anyone come across GetOpenFileName issue where "My Computer" shortcut on 
the left side of the dialog box  when clicked returns nothing ?
  I am running running Active State 5.8.7, Win32::GUI 1.03 on XP Professional 
SP2.
   
  While running same compiled script on WIN2000 PC, "My Computer" returns list 
of drives as expected, but clicking "My Documents" shortcut freezes application.
   
  Thanks.
  Igor.