<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/libdex-improvements-jftxzre6k" -->

---
title: Libdex Improvements | daily.dev
description: Libdex 1.2, still in pre-alpha, is expanding from a futures and fibers library into a fuller concurrency toolkit for GNOME applications. New additions include...
canonical: https://daily.dev/posts/libdex-improvements-jftxzre6k
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Libdex Improvements | daily.dev
og:description: Libdex 1.2, still in pre-alpha, is expanding from a futures and fibers library into a fuller concurrency toolkit for GNOME applications. New additions include...
og:url: https://daily.dev/posts/libdex-improvements-jftxzre6k
og:image: https://api.daily.dev/og/posts/JFTxzRe6K.png
og:image:alt: Libdex Improvements
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Libdex Improvements

**[Happenings in GNOME](https://daily.dev/sources/chergert)** · 3 min read · 0 upvotes · 0 comments

## Summary

Libdex 1.2, still in pre-alpha, is expanding from a futures and fibers library into a fuller concurrency toolkit for GNOME applications. New additions include DexLimiter for bounding concurrency with permits, DexTaskGroup for structured scoping of related futures (close, await, or cancel as one unit), and DexThreadPool for integrating blocking libraries and foreign code via a fixed pool of OS threads. Timeout wrappers like dex_future_with_timeout_seconds() and dex_future_with_deadline() turn deadlines into ordinary future composition. On the I/O side, new AIO functions (dex_aio_open/close) use io_uring where available, and broader GIO coverage adds future-first wrappers for GFile, streams, sockets, resolvers, proxies, TLS/DTLS, and more.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blogs.gnome.org/chergert/2026/06/02/libdex-improvements>

## Questions this post answers

### How do I bound concurrency for multiple async subtasks in libdex?

Libdex 1.2 introduces DexLimiter, which lets a workload run with a fixed concurrency budget by acquiring a permit before work starts and releasing it after a fiber completes, via dex_limiter_run(). Combined with DexTaskGroup, which gives related futures a structured scope that can be closed, awaited, or cancelled as one unit, this makes bounded concurrent workflows like file loaders easier to write and clean up.

_Developers tracking new concurrency primitives in libraries like libdex can follow releases on daily.dev._

### How do I add a timeout to a future in libdex?

Libdex provides timeout wrappers, dex_future_with_timeout_seconds() and dex_future_with_deadline(), that turn time limits into ordinary future composition instead of open-coded timeout state. A future built this way resolves normally, rejects normally, or rejects with DEX_ERROR_TIMED_OUT when the deadline is reached, added as part of the 1.2 concurrency toolkit work.

_daily.dev helps developers stay current on concurrency APIs like libdex's deadline handling as they evolve._

### What is DexThreadPool for in libdex and when should I use it instead of fibers?

DexThreadPool is a fixed pool of reusable OS threads meant for work that is not naturally fiber-shaped, such as integrating blocking libraries, database clients, filesystem helpers, or other foreign code. It exposes dex_thread_pool_submit() for asynchronous submission and dex_thread_pool_close() for an explicit shutdown path, giving that integration a bounded queue rather than unbounded thread spawning.

_Teams choosing between fibers and thread pools for blocking work can track libdex's approach on daily.dev._

## Similar posts on daily.dev

- [GitHub - ClickHouse/silk: Fast stackful fibers with a NUMA-aware work-stealing scheduler](https://daily.dev/posts/github---clickhouse-silk-fast-stackful-fibers-with-a-numa-aware-work-stealing-scheduler-1rzbxjioh) · Hacker News · 58 upvotes · 2 comments

---

Tags: [#linux](https://daily.dev/tags/linux), [#c](https://daily.dev/tags/c)

[View this post on daily.dev](https://daily.dev/posts/libdex-improvements-jftxzre6k)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Libdex Improvements","url":"https://daily.dev/posts/libdex-improvements-jftxzre6k","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/libdex-improvements-jftxzre6k"},"datePublished":"2026-08-31T05:54:44.113Z","dateModified":"2026-08-31T05:56:47.379Z","description":"Libdex 1.2, still in pre-alpha, is expanding from a futures and fibers library into a fuller concurrency toolkit for GNOME applications. New additions include...","image":"https://media.daily.dev/image/upload/s--qPvKM23u--/f_auto/v1722860399/public/Placeholder%2009","thumbnailUrl":"https://media.daily.dev/image/upload/s--qPvKM23u--/f_auto/v1722860399/public/Placeholder%2009","isAccessibleForFree":true,"articleSection":"Happenings in GNOME","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Happenings in GNOME","logo":"https://media.daily.dev/image/upload/logos/placeholder.jpg","url":"https://daily.dev/sources/chergert"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/libdex-improvements-jftxzre6k","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"linux,c","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Happenings in GNOME","item":"https://daily.dev/sources/chergert"},{"@type":"ListItem","position":3,"name":"Libdex Improvements"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/libdex-improvements-jftxzre6k#faq","mainEntity":[{"@type":"Question","name":"How do I bound concurrency for multiple async subtasks in libdex?","acceptedAnswer":{"@type":"Answer","text":"Libdex 1.2 introduces DexLimiter, which lets a workload run with a fixed concurrency budget by acquiring a permit before work starts and releasing it after a fiber completes, via dex_limiter_run(). Combined with DexTaskGroup, which gives related futures a structured scope that can be closed, awaited, or cancelled as one unit, this makes bounded concurrent workflows like file loaders easier to write and clean up. Developers tracking new concurrency primitives in libraries like libdex can follow releases on daily.dev."}},{"@type":"Question","name":"How do I add a timeout to a future in libdex?","acceptedAnswer":{"@type":"Answer","text":"Libdex provides timeout wrappers, dex_future_with_timeout_seconds() and dex_future_with_deadline(), that turn time limits into ordinary future composition instead of open-coded timeout state. A future built this way resolves normally, rejects normally, or rejects with DEX_ERROR_TIMED_OUT when the deadline is reached, added as part of the 1.2 concurrency toolkit work. daily.dev helps developers stay current on concurrency APIs like libdex's deadline handling as they evolve."}},{"@type":"Question","name":"What is DexThreadPool for in libdex and when should I use it instead of fibers?","acceptedAnswer":{"@type":"Answer","text":"DexThreadPool is a fixed pool of reusable OS threads meant for work that is not naturally fiber-shaped, such as integrating blocking libraries, database clients, filesystem helpers, or other foreign code. It exposes dex_thread_pool_submit() for asynchronous submission and dex_thread_pool_close() for an explicit shutdown path, giving that integration a bounded queue rather than unbounded thread spawning. Teams choosing between fibers and thread pools for blocking work can track libdex's approach on daily.dev."}}]}
```

