Skip to content

belozierov/PosixDispatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 

Repository files navigation

PosixDispatch

A cross-platform library written in Swift 5 for multithreading based on POSIX threads. It has a similar API to Apple’s GCD and in most cases works much faster.

It consists of the following:

  • PLock - wrapper for POSIX mutex, analog to NSLock
  • PCondition - wrapper for POSIX condition, analog to NSCondition
  • PThread - wrapper for POSIX thread, analog to Thread
  • PThreadPool - thread pool implementation
  • PDispatchQueue - FIFO queue for serially or concurrently executing tasks, analog to DispatchQueue
  • PDispatchGroup - group of tasks for aggregation and synchronization, analog to DispatchGroup
  • PDispatchSemaphore - semaphore implementation, analog to DispatchSemaphore
  • PDispatchWorkItem - block wrapper, analog to DispatchWorkItem