eleev/extensions-kit

Next 1.4.0 update

eleev opened this issue · 0 comments

eleev commented

The next update will include the following extensions:

Foundation

Custom Types

  • ObjectPool - thread-safe implementation of ObjectPool design pattern
  • Observer - thread-safe implementation of Observer design pattern (don't confuse with NotiifcationCenter - it's an implementation of Publish-Subscribe pattern)
  • MulticastDelegation - non thread-safe implementation of MulticastDelegation design pattern

Extensions

Date

  • Date+FirstLast - adds a number of properties that allow to quickly access: first day of a week, start of a day, end of a day and a number of days in a month
  • Date+PreviousNext - adds properties that allow to get access to the previous and next days

Array

Sequence

  • Sequence+Count - counts the number of occurrences of a logical expression

Grand Central Dispatch

  • Atomic - guarantees that a valid value will be returned when accessing such property by using multiple thread
  • Mutex - used to proptect shared resources. A mutex is owned by the task that takes it. In a given region of code only one thread is active
  • ReadWriteLock - a synchronization primitive that solves one of the readers–writers problems
  • UnfairLock - a lock which causes a thread trying to acquire it to simply wait in a loop ("spin") while repeatedly checking if the lock is available

The update also brings support for Swift 4.2 and adds minor changes that guarantee conformance to the latest SDK.