Re: threading / timers / etc



hi,
Am 22.10.2010 18:06, schrieb Ryan Lortie:
> Hello
> 
> We have an agreement at the hackfest that I will do the following things
> now:
> 
>   - Starting immediately, glib will depend on librt (and therefore
>     libpthread) on systems that have it.
> 
>   - We will add GTimeSpec which is GTimeVal using nanoseconds instead of
>     microseconds (same story with struct timeval vs. struct timespec).
>     The librt interfaces provide this level of accuracy so it would be a
>     shame to needlessly discard it.
> 
>   - We will expose an API in glib that gives the monotonic time (if
>     possible) or otherwise falls back to the wall clock time.  gthread
>     on Windows is using GetSystemTimeAsFileTime for example (which is
>     wall clock time), so not much more we can do there...
> 
>   - g_source_get_current_time() will be deprecated and replaced with an
>     API based on monotonic time.
> 
>   - Existing sources in glib (timeouts, mostly) will use monotonic time
>     instead of wall clock time.

gslice also.


> 
>   - GPeriodic will use monotonic time for the timestamp value to the
>     "tick" parameter.
> 
>   - The rules about initialising the thread system do not change at all.
> 
> We also plan the following for the future ("glib 4.0"):
> 
>   - libgthread will stop existing, be folded into libglib and it will
>     become impossible to replace the default threading implementation
>     for your platform.  Threads will be "turned on" always.
> 
> Comments?

Yes!

Stefan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]