def destroy(opts = {})
      task = opts[:task] || ipc_space || mach_task_self
      semaphore_destroy(task.to_i, port)
    end
def destroy(opts = {})
      task = opts[:task] || ipc_space || mach_task_self
      semaphore_destroy(task.to_i, port)
    end
Create a new Semaphore.

 @param [Hash] opts

 @option opts [Integer] :value the initial value of the
 semaphore; defaults to 1

 @option opts [Integer] :task the Mach task that owns the
 semaphore (defaults to Mach.task_self)

 @options opts [Integer] :sync_policy the sync policy for this
 semaphore (defaults to SyncPolicy::FIFO)

 @options opts [Integer] :port existing port to wrap with a
 Semaphore object; otherwise a new semaphore is created

 @return [Integer] a semaphore port name
 Destroy a Semaphore.

 @param [Hash] opts

 @option opts [Integer] :task the Mach task that owns the
 semaphore (defaults to the owning task)