On Suday the 11th of February, 2007 -after 3 and a half years on InvisionFree, we have moved! This old board remains as a read only archive of years past, and registration has been disabled here. All new and current members should register at http://www.cpplc.net/forum .

zIFBoards - Free Forum Hosting
Enjoy forums? Start your own community for free.

Learn More · Sign-up Now
Welcome to C++ Learning Community. We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you're already a member please log in to your account to access all of our features:

Name:   Password:

Please help out

  Reply to this topicStart new topicStart Poll

> writing a simple multi-threaded program, writing a simple multi-threaded program
Posted: Apr 18 2005, 12:04 AM
Quote Post


Group: Members
Posts: 1
Member No.: 1,288
Joined: 17-April 05

I'm writing a program for my networking class. The rest of the class is using python to make a simple SMTP server, but as I've never learned python, I got permission to use C++. The (wierd) requirement of the assignment is that when the user enters the "DATA" command, the server connects back to the client to retrieve the data.

My problem, is that I'll need the loop that reads the commands from the client to be running in a separate thread so I can start the server and type something like "connect" to connect to another server and still be able to read commands from another client.

So, does anyone know of a (very) simple threading library without all the bells and wistles that I could use for this project?
PMEmail Poster
Posted: Apr 18 2005, 01:06 AM
Quote Post


Group: Members
Posts: 1,465
Member No.: 420
Joined: 30-December 03

Well, I don't know about the without bells and wistles part, but Boost is a very good library, widely supported, some of it likely to end up in C++0x, proven track record, etc. etc.

PMUsers Website
Posted: Apr 18 2005, 07:57 AM
Quote Post


Group: Members
Posts: 268
Member No.: 1,143
Joined: 20-December 04

learning and then using thread library from boost would be better but if you lack the time then go for 'pthreads' which is what most C/C++ programmers use to create multi-threaded apps under gnu/linux. its very simple to learn and use(the library, not multi-threading concepts!) search for some simple tutorials on google, like this:


Absolute Beginner(programming): 'You Can Do It' by Francis Glassborow
Absolute Beginner(c++): 'Accelerated C++' by Andrew Koenig and Barbara Moo
Free Online Book: http://mindview.net/Books/TICPP/ThinkingInCPP2e.html
C++ Bible: 'The C++ Programming Language' by Bjarne Stroustrup
PMEmail Poster
« Next Oldest | C++ for Linux | Next Newest »
DealsFor.me - The best sales, coupons, and discounts for you

Topic Options Reply to this topicStart new topicStart Poll

Skin selector developed by XJONX. Skins created by various members of the IF Skin Zone and InvisionFree Skinning

Please help out
Hosted for free by zIFBoards* (Terms of Use: Updated 2/10/2010) | Powered by Invision Power Board v1.3 Final © 2003 IPS, Inc.
Page creation time: 0.0812 seconds | Archive