Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 04-10-2008
codeazure
 
 
Posts: n/a
Ice or Boost threads?

Hi everyone,

I've just started learning Ice & am eagerly absorbing all the great design ideas. It's quite a steep learning curve, but does seem very well thought out. The documentation is excellent.

One of the design decisions I have to make is to use the Ice or Boost threads library.

I know you can't easily comment on the implementation details of third party libraries, but at a glance they do seem similar (not surprising as they both wrap around the same underlying concept).

Is there any particular reason why I should use one or the other? In other words, are there benefits in other areas of Ice if I'm using Ice threads?

One benefit that does occur to me is that by using Ice threads, I would not be linking against 2 sets of thread libraries (since Ice internally would use it) and making my application unnecessarily larger. Other than this they seem very similar to me.

Thanks,
Jeff Gray
Reply With Quote
  #2 (permalink)  
Old 04-11-2008
matthew's Avatar
matthew matthew is offline
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,061
I wouldn't use boost only for the threading support -- I'm pretty sure, with the exception of thread local data, the Ice threading libraries have all your bases covered. If boost has some other stuff you want to use then it makes sense to use it -- assuming, of course, all your desired platforms/compilers are covered.
Reply With Quote
  #3 (permalink)  
Old 04-11-2008
bernard's Avatar
bernard bernard is online now
ZeroC Staff
 
Name: Bernard Normier
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Palm Beach Gardens, FL
Posts: 817
Hi Jeff,

I had a quick look at the Boost.Thread library and the latest version looks like a big improvement over previous ones.

In a few years, C++ compilers will support C++0x with its new thread library, and at this time all existing thread libraries will be obsolete.
Today, the closest thing to this future standard thread library is Boost.Thread; that's certainly one big advantage of Boost.Thread over IceUtil.

IceUtil threads & sync may also have some advantages of its own:

- it comes with Ice, so no extra library to use in your Ice-based application (as you mentioned)
- you may like some features in IceUtil that are not in Boost.Thread (such as static mutexes and monitors)
- there may be some quality of implementation differences that you care about, for example Ice is now using a monotonic clock for timeouts. I am not sure if Boost.Thread does the same.

Ice is totally neutral with respect to the thread library you use; it doesn't provide special hooks or requires less coding if you use IceUtil instead of Boost.

Best regards,
Bernard
__________________
Bernard Normier
ZeroC, Inc.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Create C# threads as background threads? bpolivka Help Center 19 01-31-2007 06:36 PM
Java VM Crash within Ice.CommunicatorI.destroy and many threads w/ Prioxies. jae Help Center 3 10-17-2006 10:09 PM
Collaboration with Boost ? e_quere Comments 2 04-27-2006 05:16 PM
boost::condiition lock Problem ipek Help Center 4 03-10-2006 03:31 PM
Precisely how are Ice threads implemented? ChrisC Help Center 8 12-22-2005 12:39 PM


All times are GMT -4. The time now is 11:29 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.