Skip to main content
gamedev.net
🔒 Locked

Cross-platform threading/events lib

Started by Tylon 1 reply 250+ views
Original Post
Tylon
Tylon
I am writing the server for my project (C++ console app). I already have a cross platform network library, but what I still need is some form of threading library to limit the server to 30 FPS. I was thinking of the two approaches: 1. Get tick-count after every frame, and sleep the thread until its next time-slot to make 30fps. 2. Use an event driven system where I create a timer that ticks every 1000/30 ms. Could anyone suggest a library that is as lightweight as possible to fulfill my needs? Or perhaps, with method 1, I dont even need a library, i could simply IFDEF the sleep and tick-count commands? (I dont know much about linux). (Note: by cross platform, I mean only Windows and Linux) Help is much appreciated. [edited by - Tylon on December 31, 2003 10:55:24 AM]
Shannon Barber
Shannon Barber
I think Boost threads will do everything you need.
ACE is more complicated, but supports asycronous IO, thread-local-storage, etc... it''s a full networking and threading library.



- Magmai Kai Holmlor

Not For Rent

[Look for information | GDNet Start Here | GDNet Search Tool | GDNet FAQ | MSDN RTF[L] | SGI STL Docs | STFW | Asking Smart Questions ]
[Free C++ Libraries | Boost | ACE | Loki | MTL | Blitz++ | wxWindows| Spirit(xBNF)]
[Free C Libraries | zlib ]

The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.