<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>30 Jan 2015 14:27:00 Z</lastBuildDate><pubDate>27 Jan 2015 17:21:00 Z</pubDate><description>There is a main UI thread. It starts 2 "subthreads". One is used to show Motion JPEG on Image control of UI thread and other is used for getting some other information and displaying it on UI too. Below sample code:&#13;
&#13;
Main thread (UIWindow)&#13;
Event(ProcessImageFrame,UIWindow..Name,"ProcessImageFrame")&#13;
Initialize Code: (started when window is opened)&#13;
ThreadExecute("Thread2",threadNormal,UpdateServerInformation)&#13;
BTN_Play_Click (started when button is clicked)&#13;
ThreadExecute("Thread1",threadNormal,ProcessMedia)&#13;
PROCEDURE ProcessImageFrame(uMessage,wParam,lParam) // code for create Image and display it Multitask(-100) ThreadSendSignal("Thread1")&#13;
Thread 1&#13;
&#13;
PROCEDURE ProcessMedia WHILE True // reading HTTP response with image raw content PostMessage(Handle(UIWindow),"ProcessImageFrame",Content,Length) ThreadWaitSignal() Multitask(-100) END&#13;
Thread 2&#13;
&#13;
PROCEDURE UpdateServerInformation WHILE True // getting server information // display on UI Multitask(-100) END&#13;
&#13;
The problem is when I click button and "Thread 1" is executing ("Thread 2" is already working") then "Thread 2" is stopped and no server information is updated. The main thread works only with "Thread 1", i.e. data is read and posted to main window via PostMessage, then this thread waits for a signal from UI thread. In the main thread those data is prepared to display and is displayed and send signal to "Thread 1" to continue... And so on. "Thread 2" is silent :( When "Thread 1" is stopped then "Thread 2" continue its work. Could someone help me? Or give advise how to work with threads correctly? Thanx.</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads/read.awp</link><title>Work with threads</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50206/read.awp</comments><pubDate>30 Jan 2015 14:27:00 Z</pubDate><description>Hi Arekusei,&#13;
&#13;
I'm very glad for you that it is now working!&#13;
&#13;
Now I want to recap a make a point clear:&#13;
&#13;
- Both of your thr…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50206/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50206/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads/read.awp">Work with threads</source><title>Re: Work with threads</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50203/read.awp</comments><pubDate>30 Jan 2015 11:49:00 Z</pubDate><description>Hi, Alexandre.&#13;
&#13;
I re-read all you wrote me and you was right ponting me on incorrect threading mode. I've read the documentati…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50203/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50203/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads/read.awp">Work with threads</source><title>Re: Work with threads</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50189/read.awp</comments><pubDate>29 Jan 2015 14:34:00 Z</pubDate><description>Hi Arekusei,&#13;
&#13;
There is only one thing that makes me uncomfortable about your code and it is the use of a class object.&#13;
&#13;
Here…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50189/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50189/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads/read.awp">Work with threads</source><title>Re: Work with threads</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50172/read.awp</comments><pubDate>29 Jan 2015 08:18:00 Z</pubDate><description>Hi Aleandre.&#13;
&#13;
Here it is as it looks:&#13;
&#13;
End of initialization WIN_MS&#13;
&#13;
ProcessServerUsage() // automated procedure&#13;
BTN_Play…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50172/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50172/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads/read.awp">Work with threads</source><title>Re: Work with threads</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50164/read.awp</comments><pubDate>28 Jan 2015 17:32:00 Z</pubDate><description>Hi Arekusei,&#13;
&#13;
I'm sorry but I can't help you above that since I do not know how your code is organized (threads, non-thread) a…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50164/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50164/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads/read.awp">Work with threads</source><title>Re: Work with threads</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50163/read.awp</comments><pubDate>28 Jan 2015 17:12:00 Z</pubDate><description>Alexandre, thank you for your help!&#13;
&#13;
I've used your example and create 2 automated procedures running in threads. The single d…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50163/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50163/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads/read.awp">Work with threads</source><title>Re: Work with threads</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50161/read.awp</comments><pubDate>28 Jan 2015 16:08:00 Z</pubDate><description>Hi Arekusei,&#13;
&#13;
Read my other posts, this will answer your question. Test the above code, this will also answer your question ab…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50161/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50161/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads/read.awp">Work with threads</source><title>Re: Work with threads</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50160/read.awp</comments><pubDate>28 Jan 2015 16:03:00 Z</pubDate><description>Quote&#13;
Alexandre Leclerc&#13;
&#13;
Please, take the time to do a very simple test project.&#13;
Ok. I will try this code. How can I pass pa…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50160/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50160/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads/read.awp">Work with threads</source><title>Re: Work with threads</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50157/read.awp</comments><pubDate>28 Jan 2015 15:51:00 Z</pubDate><description>Hi again Arekusei,&#13;
&#13;
Quote&#13;
&#13;
How?! Imaging... a window... on windows message loop...&#13;
&#13;
When I speak of one thread, I do not s…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50157/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50157/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads/read.awp">Work with threads</source><title>Re: Work with threads</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50156/read.awp</comments><pubDate>28 Jan 2015 15:41:00 Z</pubDate><description>Hi Arekusei,&#13;
&#13;
You see, some code in your code was causing issues. So my guess is that some other code is also causing issues. …</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50156/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50156/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads/read.awp">Work with threads</source><title>Re: Work with threads</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50155/read.awp</comments><pubDate>28 Jan 2015 15:38:00 Z</pubDate><description>Hi Arekusei,&#13;
&#13;
Please, take the time to do a very simple test project. Create an empty form, put a Multi-Line Text control in i…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50155/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50155/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads/read.awp">Work with threads</source><title>Re: Work with threads</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50134/read.awp</comments><pubDate>28 Jan 2015 09:58:00 Z</pubDate><description>Lets' continue.. I created an automared procedure UpdateServerData that is running in a thread.&#13;
&#13;
PROCEDURE UpdateServerData() …</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50134/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50134/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads/read.awp">Work with threads</source><title>Re: Work with threads</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50133/read.awp</comments><pubDate>28 Jan 2015 09:40:00 Z</pubDate><description>Well.. I leave only main thread and the secondary thread. Secondary thread read data and PostMessage to main window to display p…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50133/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50133/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads/read.awp">Work with threads</source><title>Re: Work with threads</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50129/read.awp</comments><pubDate>28 Jan 2015 08:46:00 Z</pubDate><description>Hi Alexandre.&#13;
&#13;
I don't understand why you don't understand :)&#13;
&#13;
Quote&#13;
&#13;
The same thread is doing the HTTP request and also p…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50129/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50129/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads/read.awp">Work with threads</source><title>Re: Work with threads</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50125/read.awp</comments><pubDate>27 Jan 2015 22:04:00 Z</pubDate><description>Hi Arekusei,&#13;
&#13;
The same thread is doing the HTTP request and also processing the data, then sends an image to the main applicat…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50125/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50125/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads/read.awp">Work with threads</source><title>Re: Work with threads</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50124/read.awp</comments><pubDate>27 Jan 2015 21:57:00 Z</pubDate><description>Hi again Arekusei,&#13;
&#13;
Ok, now I understand better where you are going. I still do not get how your processes are split. Is one t…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50124/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50124/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads/read.awp">Work with threads</source><title>Re: Work with threads</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50123/read.awp</comments><pubDate>27 Jan 2015 21:41:00 Z</pubDate><description>Btw, below a sample code on C# (cut). Here it is the example of what I need.&#13;
&#13;
// create and start new thread thread = new Thre…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50123/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50123/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads/read.awp">Work with threads</source><title>Re: Work with threads</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50122/read.awp</comments><pubDate>27 Jan 2015 21:33:00 Z</pubDate><description>Quote&#13;
Alexandre Leclerc&#13;
&#13;
The http result can be read in the same thread that makes the request.&#13;
Maybe I explain badly... My …</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50122/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50122/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads/read.awp">Work with threads</source><title>Re: Work with threads</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50117/read.awp</comments><pubDate>27 Jan 2015 19:29:00 Z</pubDate><description>Hi Arekusei,&#13;
&#13;
The http result can be read in the same thread that makes the request. If you want, you can indeed call another …</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50117/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50117/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads/read.awp">Work with threads</source><title>Re: Work with threads</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50116/read.awp</comments><pubDate>27 Jan 2015 19:25:00 Z</pubDate><description>I did a presentation for WXLive on October 10th of 2014 where I demonstrated multithreading with UI updates using the example of…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50116/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50116/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads/read.awp">Work with threads</source><title>Re: Work with threads</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50115/read.awp</comments><pubDate>27 Jan 2015 19:01:00 Z</pubDate><description>Quote&#13;
Alexandre Leclerc&#13;
&#13;
I think that all this is a bit complicated for a simple task. You could use only one thread. In that…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50115/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50115/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads/read.awp">Work with threads</source><title>Re: Work with threads</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50114/read.awp</comments><pubDate>27 Jan 2015 17:46:00 Z</pubDate><description>Hi Arekusei,&#13;
&#13;
I think that all this is a bit complicated for a simple task. You could use only one thread. In that thread you …</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50114/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads-50114/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/50111-work-with-threads/read.awp">Work with threads</source><title>Re: Work with threads</title></item></channel></rss>
