Ecere SDK/eC Forums
http://ecere.com/forums/
Print view

Easy Networing & Threading Programming tutorial in eC?
http://ecere.com/forums/viewtopic.php?f=9&t=192
Page 1 of 1
Author:  samsam598 [ Thu Sep 15, 2011 1:20 am ]
Post subject:  Easy Networing & Threading Programming tutorial in eC?

Hi,

So far I've adventured the eC world and it is so wonderful.I want to start learning networking and threading in eC.For networking,although there is no tutorial up to now,there is a lot of examples in the SDK.It is a bit hard to learn ,but I would like to learn from the code a piece by a piece.Anyway guidlines and/or introductions are much appreciated.

So any brief tutorial/introduction for threading programing in eC?A starter step by step example should do great help as well.

Thanks.
Author:  jerome [ Thu Sep 15, 2011 12:17 pm ]
Post subject:  Re: Easy Networing & Threading Programming tutorial in eC?

Here's a small sample from the wiki on threading:

Code: Select all

import "ecere"
 
Mutex mutex { };
Semaphore semaphore { };
MyThread thread { };
 
class MyThread : Thread
{
   uint Main()
   {
      for(;;)
      {
         mutex.Wait();
         semaphore.Release();
         mutex.Release();
      }
      return 0;
   }
}
 
void Test()
{
   thread.Create();
}
Of particular interest to you might be the threads/threadsAndListBoxes sample, which teaches threading and networking together. I will move the rest of the topic to the networking forums.
All times are UTC-05:00 Page 1 of 1