raindrops RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / Atom feed
d3913a8faa8e792f23fb89c6122177d4f2a1e036 blob 1718 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
 
# -*- encoding: binary -*-
#
# Each Raindrops object is a container that holds several counters.
# It is internally a page-aligned, shared memory area that allows
# atomic increments, decrements, assignments and reads without any
# locking.
#
#   rd = Raindrops.new 4
#   rd.incr(0, 1)   -> 1
#   rd.to_ary       -> [ 1, 0, 0, 0 ]
#
# Unlike many classes in this package, the core Raindrops class is
# intended to be portable to all reasonably modern *nix systems
# supporting mmap().  Please let us know if you have portability
# issues, patches or pull requests at mailto:raindrops-public@bogomips.org
class Raindrops

  # Used to represent the number of +active+ and +queued+ sockets for
  # a single listen socket across all threads and processes on a
  # machine.
  #
  # For TCP listeners, only sockets in the TCP_ESTABLISHED state are
  # accounted for.  For Unix domain listeners, only CONNECTING and
  # CONNECTED Unix domain sockets are accounted for.
  #
  # +active+ connections is the number of accept()-ed but not-yet-closed
  # sockets in all threads/processes sharing the given listener.
  #
  # +queued+ connections is the number of un-accept()-ed sockets in the
  # queue of a given listen socket.
  #
  # These stats are currently only available under \Linux
  class ListenStats < Struct.new(:active, :queued)

    # the sum of +active+ and +queued+ sockets
    def total
      active + queued
    end
  end

  autoload :Linux, 'raindrops/linux'
  autoload :Struct, 'raindrops/struct'
  autoload :Middleware, 'raindrops/middleware'
  autoload :Aggregate, 'raindrops/aggregate'
  autoload :LastDataRecv, 'raindrops/last_data_recv'
  autoload :Watcher, 'raindrops/watcher'
end
require 'raindrops_ext'
debug log:

solving d3913a8 ...
found d3913a8 in https://yhbt.net/raindrops.git

raindrops RubyGem user+dev discussion/patches/pulls/bugs/help

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhbt.net/raindrops-public
	git clone --mirror http://ou63pmih66umazou.onion/raindrops-public

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 raindrops-public raindrops-public/ https://yhbt.net/raindrops-public \
		raindrops-public@yhbt.net raindrops-public@bogomips.org raindrops@librelist.org raindrops@librelist.com
	public-inbox-index raindrops-public

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.raindrops
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.raindrops
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for the project(s) associated with this inbox:

	raindrops.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git