On this page
sametime
Prev: requ | Up: projects | Next: astree
Rel: wispsy, Foundation, builtouts
Ref: wispsy on GitHub
Tags: #public #wispsy #project #foundation #tier/core
Role
Bounded synchronous thread concurrency for independent I/O operations—providing thread_map, thread_iter, and thread_outcomes directly on Python 3.14+'s concurrent.futures.
Install
pip install sametime
Quickstart
from sametime import thread_map, thread_outcomes
lengths = thread_map(len, ["hello", "world", "concurrency"], max_workers=3)
with thread_outcomes(int, ["10", "invalid", "30"], max_pending=2) as results:
for outcome in results:
print(outcome.index, outcome.value if outcome.ok else outcome.error)
When to Reach for It
- Running independent synchronous I/O tasks in parallel with strict worker and pending-future bounds.
- Capturing per-item errors via
Outcomeinstead of aborting the whole batch.
Gotchas & Pitfalls
- I/O-bound workloads only: Built on
concurrent.futuresthreads (>=3.14), so it speeds up blocking I/O (HTTP, disk, subprocesses) but does not bypass the GIL for pure-Python CPU-bound loops. - Explicit worker and pending bounds: Tune
max_workersand pending-future limits so huge iterables do not queue unbounded tasks in memory. - Inspect
Outcomeobjects:thread_outcomescaptures per-item exceptions instead of raising immediately—always check eachOutcomebefore unwrapping its value.
Pairs With
- requ — Fans out bounded HTTP(S) retrievals safely.
- builtouts — Complements stdlib-first concurrency conventions.
Metadata
type: project-card
slug: sametime
org: wispsy
repo: wispsy/sametime
package: sametime
version: 0.1.0
requires_python: ">=3.14"
layer: foundation
topic: wispsy-foundation
status: active
language: python
source_docs: README.md, docs/
Linked from
Related notes
- wiki/projects/astree Linked here; links to this page; shared tags: #foundation, #project, #tier, #wispsy
- wiki/projects/builtouts Linked here; links to this page; shared tags: #foundation, #project, #tier, #wispsy
- wiki/projects/requ Linked here; links to this page; shared tags: #foundation, #project, #tier, #wispsy
- wiki/stack/foundation Linked here; links to this page; shared tags: #foundation, #tier, #wispsy
- wiki/projects Linked here; links to this page; shared tags: #wispsy
- wiki/compatibility links to this page; shared tags: #tier, #wispsy
- wiki/orgs/wispsy Linked here; shared tags: #tier, #wispsy
- tuts/third_party/python3/wispsy links to this page; shared tags: #tier
- wiki/projects/backpack-store shared tags: #foundation, #project, #tier, #wispsy
- wiki/projects/enforce-type shared tags: #foundation, #project, #tier, #wispsy