Ecere SDK/eC Forums • View topic - Easy Networing & Threading Programming tutorial in eC?




Ecere SDK/eC Forums

Ecere Developers Community

Easy Networing & Threading Programming tutorial in eC?

Help with the Ecere cross platform system functionality: working with files, threads, timers, databases, etc.

Easy Networing & Threading Programming tutorial in eC?

Postby samsam598 » Thu Sep 15, 2011 1:20 am

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.
samsam598
 
Posts: 208
Joined: Thu Apr 14, 2011 9:44 pm

Re: Easy Networing & Threading Programming tutorial in eC?

Postby jerome » Thu Sep 15, 2011 12:17 pm

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.
jerome
Site Admin
 
Posts: 623
Joined: Sat Jan 16, 2010 11:16 pm


Return to System Library

Who is online

Users browsing this forum: No registered users and 0 guests

cron