nio4r 2.3.1 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f8796c2f2ce109bc99fe6fab1010bebdb8715cfbfbc31ca0aabbce1d9e56acd4
4
- data.tar.gz: 15ff6b62bfa43c5d730c22961e7ab2c4232f4b060cb1632ca5ff649b108dd99e
3
+ metadata.gz: 93a1a241691b4115c57d823095030d46f36640184d6dc479ec0c46ac3e730d43
4
+ data.tar.gz: c0795ea1c7e4c3d9a0f6347ce69f3d937f0410618e80c217cc5c54c90bf44ddb
5
5
  SHA512:
6
- metadata.gz: 17d0b1f7c63515a6ce68b1451a682dd0e4b4a4b3fc5fb8709b368bc90733c9fa5f54da3f8178500b16f6a28c08bfb85fca2fe4a4c61b12fd3a93713f73ae964a
7
- data.tar.gz: 904c80947418c7ef90405f9e392993de05666801882ba7ddaab190d86b8f76606c769f763a1da9a7b23f649499bb2ae5578f0717b40927d33fe39d7987b68714
6
+ metadata.gz: 289370e25ed8f9692699a493d7cae6dccb5a24db65af58053c094a529eac7e3a65b9581f7576e46661e02a4ef017defdd1ca3805a7e1e1db38025f4c62513e6e
7
+ data.tar.gz: 854804c274c63ef8590164ef733d2a538e004d744e13090b1c60ef0b070617e3a49d3c528d50da940c02855446e057e33674f97c121f73c0295e3ea0d96dcd54
data/.gitignore CHANGED
@@ -18,3 +18,4 @@ tmp
18
18
  lib/nio4r_ext.*
19
19
  ext/**/*.o
20
20
  ext/**/nio4r_ext.*
21
+ .rspec_status
@@ -1,7 +1,13 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.2
2
+ TargetRubyVersion: 2.3
3
3
  DisplayCopNames: true
4
4
 
5
+ Layout/SpaceInsideBlockBraces:
6
+ Enabled: false
7
+
8
+ Style/IfUnlessModifier:
9
+ Enabled: false
10
+
5
11
  #
6
12
  # Lint
7
13
  #
@@ -21,6 +27,7 @@ Metrics/AbcSize:
21
27
 
22
28
  Metrics/BlockLength:
23
29
  Max: 128
30
+ Enabled: false
24
31
 
25
32
  Metrics/ClassLength:
26
33
  Max: 128
@@ -1,36 +1,29 @@
1
1
  language: ruby
2
- sudo: false
3
2
  cache: bundler
4
-
5
- before_install:
6
- - gem update --system
7
- - gem --version
8
-
3
+ dist: xenial
9
4
  bundler_args: --without development
10
5
 
11
- branches:
12
- only:
13
- - master
14
-
15
- rvm:
16
- - jruby-9.1.17.0 # latest stable
17
- - 2.2.7
18
- - 2.3.4
19
- - 2.4.1
20
- - 2.5.0
21
- - ruby-head
22
-
23
- env:
24
- global:
25
- - JRUBY_OPTS="--dev -J-Djruby.launch.inproc=true -J-Xmx1024M"
26
- matrix:
27
- - NIO4R_PURE=false
28
- - NIO4R_PURE=true
29
-
30
6
  matrix:
7
+ fast_finish: true
8
+ include:
9
+ - rvm: 2.3
10
+ - rvm: 2.4
11
+ - rvm: 2.5
12
+ - rvm: 2.6
13
+ env: NIO4R_PURE=true
14
+ - rvm: 2.6
15
+ - rvm: 2.6
16
+ os: osx
17
+ - rvm: truffleruby
18
+ - rvm: truffleruby
19
+ env: NIO4R_PURE=true
20
+ - rvm: jruby
21
+ env: JRUBY_OPTS="--debug -X+O --dev -J-Djruby.launch.inproc=true -J-Xmx1024M"
22
+ - rvm: jruby-head
23
+ env: JRUBY_OPTS="--debug -X+O --dev -J-Djruby.launch.inproc=true -J-Xmx1024M"
24
+ - rvm: ruby-head
31
25
  allow_failures:
32
26
  - rvm: ruby-head
33
- fast_finish: true
34
-
35
- notifications:
36
- irc: "irc.freenode.org#celluloid"
27
+ - rvm: truffleruby
28
+ - rvm: jruby-head
29
+ - rvm: jruby
data/Gemfile CHANGED
@@ -8,13 +8,12 @@ gem "jruby-openssl" if defined? JRUBY_VERSION
8
8
 
9
9
  group :development do
10
10
  gem "guard-rspec", require: false
11
- gem "pry", require: false
11
+ gem "pry", require: false
12
12
  end
13
13
 
14
14
  group :development, :test do
15
- gem "coveralls", require: false
16
- gem "rake-compiler", require: false
17
- gem "rspec", "~> 3.7", require: false
18
- gem "rspec-retry", require: false
15
+ gem "coveralls", require: false
16
+ gem "rake-compiler", require: false
17
+ gem "rspec", "~> 3.7", require: false
19
18
  gem "rubocop", "0.52.1", require: false
20
19
  end
data/README.md CHANGED
@@ -41,9 +41,10 @@ writing.
41
41
 
42
42
  ## Supported platforms
43
43
 
44
- * Ruby 2.2.2+
45
44
  * Ruby 2.3
46
45
  * Ruby 2.4
46
+ * Ruby 2.5
47
+ * Ruby 2.6
47
48
  * JRuby 9000
48
49
 
49
50
  ## Supported backends
data/Rakefile CHANGED
@@ -3,8 +3,6 @@
3
3
  require "bundler/gem_tasks"
4
4
  require "rake/clean"
5
5
 
6
- Dir[File.expand_path("../tasks/**/*.rake", __FILE__)].each { |task| load task }
7
-
8
6
  task default: %w[compile spec rubocop]
9
7
 
10
8
  CLEAN.include "**/*.o", "**/*.so", "**/*.bundle", "**/*.jar", "pkg", "tmp"
@@ -1,27 +1,40 @@
1
- branches:
2
- only:
3
- - master
1
+ build: off
2
+ deploy: off
4
3
 
5
4
  environment:
6
- PATH: C:\Ruby%RUBY_VERSION%\DevKit\mingw\bin;C:\Ruby%RUBY_VERSION%\bin;C:\Ruby%RUBY_VERSION%\DevKit\bin;%PATH%
5
+ PATH: C:\Ruby%RUBY_VERSION%\bin;%PATH%
6
+ APPVEYOR_SAVE_CACHE_ON_ERROR: True
7
7
  matrix:
8
- - RUBY_VERSION: "24-x64"
9
- - RUBY_VERSION: "23-x64"
10
- - RUBY_VERSION: "23"
11
- - RUBY_VERSION: "22"
8
+ - RUBY_VERSION: _trunk
9
+ - RUBY_VERSION: 26-x64
10
+ - RUBY_VERSION: 25-x64
11
+ - RUBY_VERSION: 24-x64
12
+ - RUBY_VERSION: 23-x64
13
+ - RUBY_VERSION: 23
14
+
15
+ init:
16
+ - ps: |
17
+ if ($env:RUBY_VERSION -eq '_trunk') {
18
+ $trunk_uri = 'https://ci.appveyor.com/api/projects/MSP-Greg/ruby-loco/artifacts/ruby_trunk.7z'
19
+ (New-Object Net.WebClient).DownloadFile($trunk_uri, 'C:\ruby_trunk.7z')
20
+ 7z.exe x C:\ruby_trunk.7z -oC:\Ruby_trunk
21
+ }
12
22
 
13
23
  install:
14
24
  - SET RAKEOPT=-rdevkit
25
+ - gem update --system --conservative --no-document
15
26
  - ruby -v
16
27
  - gem -v
17
28
  - bundle -v
18
- - bundle install
19
-
20
- build: off
21
-
22
- before_build:
23
- - gem update --system
29
+ - bundle install --path vendor\bundle --without development
24
30
 
25
31
  test_script:
26
- - echo %PATH%
27
32
  - bundle exec rake spec
33
+
34
+ matrix:
35
+ allow_failures:
36
+ - RUBY_VERSION: _trunk
37
+
38
+ cache:
39
+ # If one of the files after the right arrow changes, cache will be invalidated
40
+ - vendor\bundle -> appveyor.yml, Gemfile, nio4r.gemspec
@@ -1,5 +1,21 @@
1
1
  Revision history for libev, a high-performance and full-featured event loop.
2
2
 
3
+ 4.25 Fri Dec 21 07:49:20 CET 2018
4
+ - INCOMPATIBLE CHANGE: EV_THROW was renamed to EV_NOEXCEPT
5
+ (EV_THROW sitll provided) and now uses noexcept on C++11 or newer.
6
+ - move the darwin select workaround highe rin ev.c, as newer versions of
7
+ darwin managed to break their broken select even more.
8
+ - ANDROID => __ANDROID__ (reported by enh@google.com).
9
+ - disable epoll_create1 on android because it has broken header files
10
+ and google is unwilling to fix them (reported by enh@google.com).
11
+ - avoid a minor compilation warning on win32.
12
+ - c++: remove deprecated dynamic throw() specifications.
13
+ - c++: improve the (unsupported) bad_loop exception class.
14
+ - backport perl ev_periodic example to C, untested.
15
+ - update libecb, biggets change is to include a memory fence
16
+ in ECB_MEMORY_FENCE_RELEASE on x86/amd64.
17
+ - minor autoconf/automake modernisation.
18
+
3
19
  4.24 Wed Dec 28 05:19:55 CET 2016
4
20
  - bump version to 4.24, as the release tarball inexplicably
5
21
  didn't have the right version in ev.h, even though the cvs-tagged
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * libev event processing core, watcher management
3
3
  *
4
- * Copyright (c) 2007,2008,2009,2010,2011,2012,2013 Marc Alexander Lehmann <libev@schmorp.de>
4
+ * Copyright (c) 2007-2018 Marc Alexander Lehmann <libev@schmorp.de>
5
5
  * All rights reserved.
6
6
  *
7
7
  * Redistribution and use in source and binary forms, with or without modifica-
@@ -40,6 +40,10 @@
40
40
  /* ########## NIO4R PATCHERY HO! ########## */
41
41
  #include "ruby.h"
42
42
  #include "ruby/thread.h"
43
+
44
+ #ifdef __APPLE__
45
+ #include <AvailabilityMacros.h>
46
+ #endif
43
47
  /* ######################################## */
44
48
 
45
49
  /* this big block deduces configuration from config.h */
@@ -169,6 +173,16 @@
169
173
 
170
174
  #endif
171
175
 
176
+ /* OS X, in its infinite idiocy, actually HARDCODES
177
+ * a limit of 1024 into their select. Where people have brains,
178
+ * OS X engineers apparently have a vacuum. Or maybe they were
179
+ * ordered to have a vacuum, or they do anything for money.
180
+ * This might help. Or not.
181
+ * Note that this must be defined early, as other include files
182
+ * will rely on this define as well.
183
+ */
184
+ #define _DARWIN_UNLIMITED_SELECT 1
185
+
172
186
  #include <stdlib.h>
173
187
  #include <string.h>
174
188
  #include <fcntl.h>
@@ -216,14 +230,6 @@
216
230
  # undef EV_AVOID_STDIO
217
231
  #endif
218
232
 
219
- /* OS X, in its infinite idiocy, actually HARDCODES
220
- * a limit of 1024 into their select. Where people have brains,
221
- * OS X engineers apparently have a vacuum. Or maybe they were
222
- * ordered to have a vacuum, or they do anything for money.
223
- * This might help. Or not.
224
- */
225
- #define _DARWIN_UNLIMITED_SELECT 1
226
-
227
233
  /* this block tries to deduce configuration from header-defined symbols and defaults */
228
234
 
229
235
  /* try to deduce the maximum number of signals on this platform */
@@ -370,7 +376,7 @@
370
376
  # define EV_HEAP_CACHE_AT EV_FEATURE_DATA
371
377
  #endif
372
378
 
373
- #ifdef ANDROID
379
+ #ifdef __ANDROID__
374
380
  /* supposedly, android doesn't typedef fd_mask */
375
381
  # undef EV_USE_SELECT
376
382
  # define EV_USE_SELECT 0
@@ -614,6 +620,8 @@ struct signalfd_siginfo
614
620
 
615
621
  #define ECB_CPP (__cplusplus+0)
616
622
  #define ECB_CPP11 (__cplusplus >= 201103L)
623
+ #define ECB_CPP14 (__cplusplus >= 201402L)
624
+ #define ECB_CPP17 (__cplusplus >= 201703L)
617
625
 
618
626
  #if ECB_CPP
619
627
  #define ECB_C 0
@@ -625,6 +633,7 @@ struct signalfd_siginfo
625
633
 
626
634
  #define ECB_C99 (ECB_STDC_VERSION >= 199901L)
627
635
  #define ECB_C11 (ECB_STDC_VERSION >= 201112L)
636
+ #define ECB_C17 (ECB_STDC_VERSION >= 201710L)
628
637
 
629
638
  #if ECB_CPP
630
639
  #define ECB_EXTERN_C extern "C"
@@ -663,11 +672,11 @@ struct signalfd_siginfo
663
672
  #if __i386 || __i386__
664
673
  #define ECB_MEMORY_FENCE __asm__ __volatile__ ("lock; orb $0, -1(%%esp)" : : : "memory")
665
674
  #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("" : : : "memory")
666
- #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("")
675
+ #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("" : : : "memory")
667
676
  #elif ECB_GCC_AMD64
668
677
  #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mfence" : : : "memory")
669
678
  #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("" : : : "memory")
670
- #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("")
679
+ #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("" : : : "memory")
671
680
  #elif __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__
672
681
  #define ECB_MEMORY_FENCE __asm__ __volatile__ ("sync" : : : "memory")
673
682
  #elif defined __ARM_ARCH_2__ \
@@ -1682,11 +1691,11 @@ ev_printerr (const char *msg)
1682
1691
  }
1683
1692
  #endif
1684
1693
 
1685
- static void (*syserr_cb)(const char *msg) EV_THROW;
1694
+ static void (*syserr_cb)(const char *msg) EV_NOEXCEPT;
1686
1695
 
1687
1696
  ecb_cold
1688
1697
  void
1689
- ev_set_syserr_cb (void (*cb)(const char *msg) EV_THROW) EV_THROW
1698
+ ev_set_syserr_cb (void (*cb)(const char *msg) EV_NOEXCEPT) EV_NOEXCEPT
1690
1699
  {
1691
1700
  syserr_cb = cb;
1692
1701
  }
@@ -1715,7 +1724,7 @@ ev_syserr (const char *msg)
1715
1724
  }
1716
1725
 
1717
1726
  static void *
1718
- ev_realloc_emul (void *ptr, long size) EV_THROW
1727
+ ev_realloc_emul (void *ptr, long size) EV_NOEXCEPT
1719
1728
  {
1720
1729
  /* some systems, notably openbsd and darwin, fail to properly
1721
1730
  * implement realloc (x, 0) (as required by both ansi c-89 and
@@ -1731,11 +1740,11 @@ ev_realloc_emul (void *ptr, long size) EV_THROW
1731
1740
  return 0;
1732
1741
  }
1733
1742
 
1734
- static void *(*alloc)(void *ptr, long size) EV_THROW = ev_realloc_emul;
1743
+ static void *(*alloc)(void *ptr, long size) EV_NOEXCEPT = ev_realloc_emul;
1735
1744
 
1736
1745
  ecb_cold
1737
1746
  void
1738
- ev_set_allocator (void *(*cb)(void *ptr, long size) EV_THROW) EV_THROW
1747
+ ev_set_allocator (void *(*cb)(void *ptr, long size) EV_NOEXCEPT) EV_NOEXCEPT
1739
1748
  {
1740
1749
  alloc = cb;
1741
1750
  }
@@ -1862,7 +1871,7 @@ typedef struct
1862
1871
 
1863
1872
  #ifndef EV_HAVE_EV_TIME
1864
1873
  ev_tstamp
1865
- ev_time (void) EV_THROW
1874
+ ev_time (void) EV_NOEXCEPT
1866
1875
  {
1867
1876
  #if EV_USE_REALTIME
1868
1877
  if (expect_true (have_realtime))
@@ -1896,14 +1905,14 @@ get_clock (void)
1896
1905
 
1897
1906
  #if EV_MULTIPLICITY
1898
1907
  ev_tstamp
1899
- ev_now (EV_P) EV_THROW
1908
+ ev_now (EV_P) EV_NOEXCEPT
1900
1909
  {
1901
1910
  return ev_rt_now;
1902
1911
  }
1903
1912
  #endif
1904
1913
 
1905
1914
  void
1906
- ev_sleep (ev_tstamp delay) EV_THROW
1915
+ ev_sleep (ev_tstamp delay) EV_NOEXCEPT
1907
1916
  {
1908
1917
  if (delay > 0.)
1909
1918
  {
@@ -1913,6 +1922,8 @@ ev_sleep (ev_tstamp delay) EV_THROW
1913
1922
  EV_TS_SET (ts, delay);
1914
1923
  nanosleep (&ts, 0);
1915
1924
  #elif defined _WIN32
1925
+ /* maybe this should round up, as ms is very low resolution */
1926
+ /* compared to select (µs) or nanosleep (ns) */
1916
1927
  Sleep ((unsigned long)(delay * 1e3));
1917
1928
  #else
1918
1929
  struct timeval tv;
@@ -1997,7 +2008,7 @@ pendingcb (EV_P_ ev_prepare *w, int revents)
1997
2008
 
1998
2009
  noinline
1999
2010
  void
2000
- ev_feed_event (EV_P_ void *w, int revents) EV_THROW
2011
+ ev_feed_event (EV_P_ void *w, int revents) EV_NOEXCEPT
2001
2012
  {
2002
2013
  W w_ = (W)w;
2003
2014
  int pri = ABSPRI (w_);
@@ -2068,7 +2079,7 @@ fd_event (EV_P_ int fd, int revents)
2068
2079
  }
2069
2080
 
2070
2081
  void
2071
- ev_feed_fd_event (EV_P_ int fd, int revents) EV_THROW
2082
+ ev_feed_fd_event (EV_P_ int fd, int revents) EV_NOEXCEPT
2072
2083
  {
2073
2084
  if (fd >= 0 && fd < anfdmax)
2074
2085
  fd_event_nocheck (EV_A_ fd, revents);
@@ -2478,7 +2489,7 @@ evpipe_write (EV_P_ EV_ATOMIC_T *flag)
2478
2489
  #ifdef _WIN32
2479
2490
  WSABUF buf;
2480
2491
  DWORD sent;
2481
- buf.buf = &buf;
2492
+ buf.buf = (char *)&buf;
2482
2493
  buf.len = 1;
2483
2494
  WSASend (EV_FD_TO_WIN32_HANDLE (evpipe [1]), &buf, 1, &sent, 0, 0, 0);
2484
2495
  #else
@@ -2560,7 +2571,7 @@ pipecb (EV_P_ ev_io *iow, int revents)
2560
2571
  /*****************************************************************************/
2561
2572
 
2562
2573
  void
2563
- ev_feed_signal (int signum) EV_THROW
2574
+ ev_feed_signal (int signum) EV_NOEXCEPT
2564
2575
  {
2565
2576
  #if EV_MULTIPLICITY
2566
2577
  EV_P;
@@ -2587,7 +2598,7 @@ ev_sighandler (int signum)
2587
2598
 
2588
2599
  noinline
2589
2600
  void
2590
- ev_feed_signal_event (EV_P_ int signum) EV_THROW
2601
+ ev_feed_signal_event (EV_P_ int signum) EV_NOEXCEPT
2591
2602
  {
2592
2603
  WL w;
2593
2604
 
@@ -2714,13 +2725,13 @@ childcb (EV_P_ ev_signal *sw, int revents)
2714
2725
  #endif
2715
2726
 
2716
2727
  ecb_cold int
2717
- ev_version_major (void) EV_THROW
2728
+ ev_version_major (void) EV_NOEXCEPT
2718
2729
  {
2719
2730
  return EV_VERSION_MAJOR;
2720
2731
  }
2721
2732
 
2722
2733
  ecb_cold int
2723
- ev_version_minor (void) EV_THROW
2734
+ ev_version_minor (void) EV_NOEXCEPT
2724
2735
  {
2725
2736
  return EV_VERSION_MINOR;
2726
2737
  }
@@ -2739,7 +2750,7 @@ enable_secure (void)
2739
2750
 
2740
2751
  ecb_cold
2741
2752
  unsigned int
2742
- ev_supported_backends (void) EV_THROW
2753
+ ev_supported_backends (void) EV_NOEXCEPT
2743
2754
  {
2744
2755
  unsigned int flags = 0;
2745
2756
 
@@ -2754,20 +2765,21 @@ ev_supported_backends (void) EV_THROW
2754
2765
 
2755
2766
  ecb_cold
2756
2767
  unsigned int
2757
- ev_recommended_backends (void) EV_THROW
2768
+ ev_recommended_backends (void) EV_NOEXCEPT
2758
2769
  {
2759
2770
  unsigned int flags = ev_supported_backends ();
2760
2771
 
2761
- #ifndef __NetBSD__
2772
+ #if defined(__APPLE__) && (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_14)
2773
+ /* apple has a poor track record but post 10.12.2 it seems to work sufficiently well */
2774
+ #elif defined(__NetBSD__)
2762
2775
  /* kqueue is borked on everything but netbsd apparently */
2763
2776
  /* it usually doesn't work correctly on anything but sockets and pipes */
2764
- flags &= ~EVBACKEND_KQUEUE;
2765
- #endif
2766
- #ifdef __APPLE__
2777
+ #else
2767
2778
  /* only select works correctly on that "unix-certified" platform */
2768
2779
  flags &= ~EVBACKEND_KQUEUE; /* horribly broken, even for sockets */
2769
2780
  flags &= ~EVBACKEND_POLL; /* poll is based on kqueue from 10.5 onwards */
2770
2781
  #endif
2782
+
2771
2783
  #ifdef __FreeBSD__
2772
2784
  flags &= ~EVBACKEND_POLL; /* poll return value is unusable (http://forums.freebsd.org/archive/index.php/t-10270.html) */
2773
2785
  #endif
@@ -2777,7 +2789,7 @@ ev_recommended_backends (void) EV_THROW
2777
2789
 
2778
2790
  ecb_cold
2779
2791
  unsigned int
2780
- ev_embeddable_backends (void) EV_THROW
2792
+ ev_embeddable_backends (void) EV_NOEXCEPT
2781
2793
  {
2782
2794
  int flags = EVBACKEND_EPOLL | EVBACKEND_KQUEUE | EVBACKEND_PORT;
2783
2795
 
@@ -2789,56 +2801,56 @@ ev_embeddable_backends (void) EV_THROW
2789
2801
  }
2790
2802
 
2791
2803
  unsigned int
2792
- ev_backend (EV_P) EV_THROW
2804
+ ev_backend (EV_P) EV_NOEXCEPT
2793
2805
  {
2794
2806
  return backend;
2795
2807
  }
2796
2808
 
2797
2809
  #if EV_FEATURE_API
2798
2810
  unsigned int
2799
- ev_iteration (EV_P) EV_THROW
2811
+ ev_iteration (EV_P) EV_NOEXCEPT
2800
2812
  {
2801
2813
  return loop_count;
2802
2814
  }
2803
2815
 
2804
2816
  unsigned int
2805
- ev_depth (EV_P) EV_THROW
2817
+ ev_depth (EV_P) EV_NOEXCEPT
2806
2818
  {
2807
2819
  return loop_depth;
2808
2820
  }
2809
2821
 
2810
2822
  void
2811
- ev_set_io_collect_interval (EV_P_ ev_tstamp interval) EV_THROW
2823
+ ev_set_io_collect_interval (EV_P_ ev_tstamp interval) EV_NOEXCEPT
2812
2824
  {
2813
2825
  io_blocktime = interval;
2814
2826
  }
2815
2827
 
2816
2828
  void
2817
- ev_set_timeout_collect_interval (EV_P_ ev_tstamp interval) EV_THROW
2829
+ ev_set_timeout_collect_interval (EV_P_ ev_tstamp interval) EV_NOEXCEPT
2818
2830
  {
2819
2831
  timeout_blocktime = interval;
2820
2832
  }
2821
2833
 
2822
2834
  void
2823
- ev_set_userdata (EV_P_ void *data) EV_THROW
2835
+ ev_set_userdata (EV_P_ void *data) EV_NOEXCEPT
2824
2836
  {
2825
2837
  userdata = data;
2826
2838
  }
2827
2839
 
2828
2840
  void *
2829
- ev_userdata (EV_P) EV_THROW
2841
+ ev_userdata (EV_P) EV_NOEXCEPT
2830
2842
  {
2831
2843
  return userdata;
2832
2844
  }
2833
2845
 
2834
2846
  void
2835
- ev_set_invoke_pending_cb (EV_P_ ev_loop_callback invoke_pending_cb) EV_THROW
2847
+ ev_set_invoke_pending_cb (EV_P_ ev_loop_callback invoke_pending_cb) EV_NOEXCEPT
2836
2848
  {
2837
2849
  invoke_cb = invoke_pending_cb;
2838
2850
  }
2839
2851
 
2840
2852
  void
2841
- ev_set_loop_release_cb (EV_P_ void (*release)(EV_P) EV_THROW, void (*acquire)(EV_P) EV_THROW) EV_THROW
2853
+ ev_set_loop_release_cb (EV_P_ void (*release)(EV_P) EV_NOEXCEPT, void (*acquire)(EV_P) EV_NOEXCEPT) EV_NOEXCEPT
2842
2854
  {
2843
2855
  release_cb = release;
2844
2856
  acquire_cb = acquire;
@@ -2848,7 +2860,7 @@ ev_set_loop_release_cb (EV_P_ void (*release)(EV_P) EV_THROW, void (*acquire)(EV
2848
2860
  /* initialise a loop structure, must be zero-initialised */
2849
2861
  noinline ecb_cold
2850
2862
  static void
2851
- loop_init (EV_P_ unsigned int flags) EV_THROW
2863
+ loop_init (EV_P_ unsigned int flags) EV_NOEXCEPT
2852
2864
  {
2853
2865
  if (!backend)
2854
2866
  {
@@ -3099,7 +3111,7 @@ loop_fork (EV_P)
3099
3111
 
3100
3112
  ecb_cold
3101
3113
  struct ev_loop *
3102
- ev_loop_new (unsigned int flags) EV_THROW
3114
+ ev_loop_new (unsigned int flags) EV_NOEXCEPT
3103
3115
  {
3104
3116
  EV_P = (struct ev_loop *)ev_malloc (sizeof (struct ev_loop));
3105
3117
 
@@ -3156,7 +3168,7 @@ array_verify (EV_P_ W *ws, int cnt)
3156
3168
 
3157
3169
  #if EV_FEATURE_API
3158
3170
  void ecb_cold
3159
- ev_verify (EV_P) EV_THROW
3171
+ ev_verify (EV_P) EV_NOEXCEPT
3160
3172
  {
3161
3173
  #if EV_VERIFY
3162
3174
  int i;
@@ -3247,7 +3259,7 @@ struct ev_loop *
3247
3259
  #else
3248
3260
  int
3249
3261
  #endif
3250
- ev_default_loop (unsigned int flags) EV_THROW
3262
+ ev_default_loop (unsigned int flags) EV_NOEXCEPT
3251
3263
  {
3252
3264
  if (!ev_default_loop_ptr)
3253
3265
  {
@@ -3276,7 +3288,7 @@ ev_default_loop (unsigned int flags) EV_THROW
3276
3288
  }
3277
3289
 
3278
3290
  void
3279
- ev_loop_fork (EV_P) EV_THROW
3291
+ ev_loop_fork (EV_P) EV_NOEXCEPT
3280
3292
  {
3281
3293
  postfork = 1;
3282
3294
  }
@@ -3290,7 +3302,7 @@ ev_invoke (EV_P_ void *w, int revents)
3290
3302
  }
3291
3303
 
3292
3304
  unsigned int
3293
- ev_pending_count (EV_P) EV_THROW
3305
+ ev_pending_count (EV_P) EV_NOEXCEPT
3294
3306
  {
3295
3307
  int pri;
3296
3308
  unsigned int count = 0;
@@ -3307,10 +3319,11 @@ ev_invoke_pending (EV_P)
3307
3319
  {
3308
3320
  pendingpri = NUMPRI;
3309
3321
 
3310
- while (pendingpri) /* pendingpri possibly gets modified in the inner loop */
3322
+ do
3311
3323
  {
3312
3324
  --pendingpri;
3313
3325
 
3326
+ /* pendingpri possibly gets modified in the inner loop */
3314
3327
  while (pendingcnt [pendingpri])
3315
3328
  {
3316
3329
  ANPENDING *p = pendings [pendingpri] + --pendingcnt [pendingpri];
@@ -3320,6 +3333,7 @@ ev_invoke_pending (EV_P)
3320
3333
  EV_FREQUENT_CHECK;
3321
3334
  }
3322
3335
  }
3336
+ while (pendingpri);
3323
3337
  }
3324
3338
 
3325
3339
  #if EV_IDLE_ENABLE
@@ -3804,37 +3818,37 @@ rb_thread_unsafe_dangerous_crazy_blocking_region_end(...);
3804
3818
  }
3805
3819
 
3806
3820
  void
3807
- ev_break (EV_P_ int how) EV_THROW
3821
+ ev_break (EV_P_ int how) EV_NOEXCEPT
3808
3822
  {
3809
3823
  loop_done = how;
3810
3824
  }
3811
3825
 
3812
3826
  void
3813
- ev_ref (EV_P) EV_THROW
3827
+ ev_ref (EV_P) EV_NOEXCEPT
3814
3828
  {
3815
3829
  ++activecnt;
3816
3830
  }
3817
3831
 
3818
3832
  void
3819
- ev_unref (EV_P) EV_THROW
3833
+ ev_unref (EV_P) EV_NOEXCEPT
3820
3834
  {
3821
3835
  --activecnt;
3822
3836
  }
3823
3837
 
3824
3838
  void
3825
- ev_now_update (EV_P) EV_THROW
3839
+ ev_now_update (EV_P) EV_NOEXCEPT
3826
3840
  {
3827
3841
  time_update (EV_A_ 1e100);
3828
3842
  }
3829
3843
 
3830
3844
  void
3831
- ev_suspend (EV_P) EV_THROW
3845
+ ev_suspend (EV_P) EV_NOEXCEPT
3832
3846
  {
3833
3847
  ev_now_update (EV_A);
3834
3848
  }
3835
3849
 
3836
3850
  void
3837
- ev_resume (EV_P) EV_THROW
3851
+ ev_resume (EV_P) EV_NOEXCEPT
3838
3852
  {
3839
3853
  ev_tstamp mn_prev = mn_now;
3840
3854
 
@@ -3883,7 +3897,7 @@ clear_pending (EV_P_ W w)
3883
3897
  }
3884
3898
 
3885
3899
  int
3886
- ev_clear_pending (EV_P_ void *w) EV_THROW
3900
+ ev_clear_pending (EV_P_ void *w) EV_NOEXCEPT
3887
3901
  {
3888
3902
  W w_ = (W)w;
3889
3903
  int pending = w_->pending;
@@ -3927,7 +3941,7 @@ ev_stop (EV_P_ W w)
3927
3941
 
3928
3942
  noinline
3929
3943
  void
3930
- ev_io_start (EV_P_ ev_io *w) EV_THROW
3944
+ ev_io_start (EV_P_ ev_io *w) EV_NOEXCEPT
3931
3945
  {
3932
3946
  int fd = w->fd;
3933
3947
 
@@ -3954,7 +3968,7 @@ ev_io_start (EV_P_ ev_io *w) EV_THROW
3954
3968
 
3955
3969
  noinline
3956
3970
  void
3957
- ev_io_stop (EV_P_ ev_io *w) EV_THROW
3971
+ ev_io_stop (EV_P_ ev_io *w) EV_NOEXCEPT
3958
3972
  {
3959
3973
  clear_pending (EV_A_ (W)w);
3960
3974
  if (expect_false (!ev_is_active (w)))
@@ -3974,7 +3988,7 @@ ev_io_stop (EV_P_ ev_io *w) EV_THROW
3974
3988
 
3975
3989
  noinline
3976
3990
  void
3977
- ev_timer_start (EV_P_ ev_timer *w) EV_THROW
3991
+ ev_timer_start (EV_P_ ev_timer *w) EV_NOEXCEPT
3978
3992
  {
3979
3993
  if (expect_false (ev_is_active (w)))
3980
3994
  return;
@@ -3999,7 +4013,7 @@ ev_timer_start (EV_P_ ev_timer *w) EV_THROW
3999
4013
 
4000
4014
  noinline
4001
4015
  void
4002
- ev_timer_stop (EV_P_ ev_timer *w) EV_THROW
4016
+ ev_timer_stop (EV_P_ ev_timer *w) EV_NOEXCEPT
4003
4017
  {
4004
4018
  clear_pending (EV_A_ (W)w);
4005
4019
  if (expect_false (!ev_is_active (w)))
@@ -4030,7 +4044,7 @@ ev_timer_stop (EV_P_ ev_timer *w) EV_THROW
4030
4044
 
4031
4045
  noinline
4032
4046
  void
4033
- ev_timer_again (EV_P_ ev_timer *w) EV_THROW
4047
+ ev_timer_again (EV_P_ ev_timer *w) EV_NOEXCEPT
4034
4048
  {
4035
4049
  EV_FREQUENT_CHECK;
4036
4050
 
@@ -4057,7 +4071,7 @@ ev_timer_again (EV_P_ ev_timer *w) EV_THROW
4057
4071
  }
4058
4072
 
4059
4073
  ev_tstamp
4060
- ev_timer_remaining (EV_P_ ev_timer *w) EV_THROW
4074
+ ev_timer_remaining (EV_P_ ev_timer *w) EV_NOEXCEPT
4061
4075
  {
4062
4076
  return ev_at (w) - (ev_is_active (w) ? mn_now : 0.);
4063
4077
  }
@@ -4065,7 +4079,7 @@ ev_timer_remaining (EV_P_ ev_timer *w) EV_THROW
4065
4079
  #if EV_PERIODIC_ENABLE
4066
4080
  noinline
4067
4081
  void
4068
- ev_periodic_start (EV_P_ ev_periodic *w) EV_THROW
4082
+ ev_periodic_start (EV_P_ ev_periodic *w) EV_NOEXCEPT
4069
4083
  {
4070
4084
  if (expect_false (ev_is_active (w)))
4071
4085
  return;
@@ -4096,7 +4110,7 @@ ev_periodic_start (EV_P_ ev_periodic *w) EV_THROW
4096
4110
 
4097
4111
  noinline
4098
4112
  void
4099
- ev_periodic_stop (EV_P_ ev_periodic *w) EV_THROW
4113
+ ev_periodic_stop (EV_P_ ev_periodic *w) EV_NOEXCEPT
4100
4114
  {
4101
4115
  clear_pending (EV_A_ (W)w);
4102
4116
  if (expect_false (!ev_is_active (w)))
@@ -4125,7 +4139,7 @@ ev_periodic_stop (EV_P_ ev_periodic *w) EV_THROW
4125
4139
 
4126
4140
  noinline
4127
4141
  void
4128
- ev_periodic_again (EV_P_ ev_periodic *w) EV_THROW
4142
+ ev_periodic_again (EV_P_ ev_periodic *w) EV_NOEXCEPT
4129
4143
  {
4130
4144
  /* TODO: use adjustheap and recalculation */
4131
4145
  ev_periodic_stop (EV_A_ w);
@@ -4141,7 +4155,7 @@ ev_periodic_again (EV_P_ ev_periodic *w) EV_THROW
4141
4155
 
4142
4156
  noinline
4143
4157
  void
4144
- ev_signal_start (EV_P_ ev_signal *w) EV_THROW
4158
+ ev_signal_start (EV_P_ ev_signal *w) EV_NOEXCEPT
4145
4159
  {
4146
4160
  if (expect_false (ev_is_active (w)))
4147
4161
  return;
@@ -4224,7 +4238,7 @@ ev_signal_start (EV_P_ ev_signal *w) EV_THROW
4224
4238
 
4225
4239
  noinline
4226
4240
  void
4227
- ev_signal_stop (EV_P_ ev_signal *w) EV_THROW
4241
+ ev_signal_stop (EV_P_ ev_signal *w) EV_NOEXCEPT
4228
4242
  {
4229
4243
  clear_pending (EV_A_ (W)w);
4230
4244
  if (expect_false (!ev_is_active (w)))
@@ -4265,7 +4279,7 @@ ev_signal_stop (EV_P_ ev_signal *w) EV_THROW
4265
4279
  #if EV_CHILD_ENABLE
4266
4280
 
4267
4281
  void
4268
- ev_child_start (EV_P_ ev_child *w) EV_THROW
4282
+ ev_child_start (EV_P_ ev_child *w) EV_NOEXCEPT
4269
4283
  {
4270
4284
  #if EV_MULTIPLICITY
4271
4285
  assert (("libev: child watchers are only supported in the default loop", loop == ev_default_loop_ptr));
@@ -4282,7 +4296,7 @@ ev_child_start (EV_P_ ev_child *w) EV_THROW
4282
4296
  }
4283
4297
 
4284
4298
  void
4285
- ev_child_stop (EV_P_ ev_child *w) EV_THROW
4299
+ ev_child_stop (EV_P_ ev_child *w) EV_NOEXCEPT
4286
4300
  {
4287
4301
  clear_pending (EV_A_ (W)w);
4288
4302
  if (expect_false (!ev_is_active (w)))
@@ -4557,7 +4571,7 @@ infy_fork (EV_P)
4557
4571
  #endif
4558
4572
 
4559
4573
  void
4560
- ev_stat_stat (EV_P_ ev_stat *w) EV_THROW
4574
+ ev_stat_stat (EV_P_ ev_stat *w) EV_NOEXCEPT
4561
4575
  {
4562
4576
  if (lstat (w->path, &w->attr) < 0)
4563
4577
  w->attr.st_nlink = 0;
@@ -4607,7 +4621,7 @@ stat_timer_cb (EV_P_ ev_timer *w_, int revents)
4607
4621
  }
4608
4622
 
4609
4623
  void
4610
- ev_stat_start (EV_P_ ev_stat *w) EV_THROW
4624
+ ev_stat_start (EV_P_ ev_stat *w) EV_NOEXCEPT
4611
4625
  {
4612
4626
  if (expect_false (ev_is_active (w)))
4613
4627
  return;
@@ -4638,7 +4652,7 @@ ev_stat_start (EV_P_ ev_stat *w) EV_THROW
4638
4652
  }
4639
4653
 
4640
4654
  void
4641
- ev_stat_stop (EV_P_ ev_stat *w) EV_THROW
4655
+ ev_stat_stop (EV_P_ ev_stat *w) EV_NOEXCEPT
4642
4656
  {
4643
4657
  clear_pending (EV_A_ (W)w);
4644
4658
  if (expect_false (!ev_is_active (w)))
@@ -4664,7 +4678,7 @@ ev_stat_stop (EV_P_ ev_stat *w) EV_THROW
4664
4678
 
4665
4679
  #if EV_IDLE_ENABLE
4666
4680
  void
4667
- ev_idle_start (EV_P_ ev_idle *w) EV_THROW
4681
+ ev_idle_start (EV_P_ ev_idle *w) EV_NOEXCEPT
4668
4682
  {
4669
4683
  if (expect_false (ev_is_active (w)))
4670
4684
  return;
@@ -4687,7 +4701,7 @@ ev_idle_start (EV_P_ ev_idle *w) EV_THROW
4687
4701
  }
4688
4702
 
4689
4703
  void
4690
- ev_idle_stop (EV_P_ ev_idle *w) EV_THROW
4704
+ ev_idle_stop (EV_P_ ev_idle *w) EV_NOEXCEPT
4691
4705
  {
4692
4706
  clear_pending (EV_A_ (W)w);
4693
4707
  if (expect_false (!ev_is_active (w)))
@@ -4711,7 +4725,7 @@ ev_idle_stop (EV_P_ ev_idle *w) EV_THROW
4711
4725
 
4712
4726
  #if EV_PREPARE_ENABLE
4713
4727
  void
4714
- ev_prepare_start (EV_P_ ev_prepare *w) EV_THROW
4728
+ ev_prepare_start (EV_P_ ev_prepare *w) EV_NOEXCEPT
4715
4729
  {
4716
4730
  if (expect_false (ev_is_active (w)))
4717
4731
  return;
@@ -4726,7 +4740,7 @@ ev_prepare_start (EV_P_ ev_prepare *w) EV_THROW
4726
4740
  }
4727
4741
 
4728
4742
  void
4729
- ev_prepare_stop (EV_P_ ev_prepare *w) EV_THROW
4743
+ ev_prepare_stop (EV_P_ ev_prepare *w) EV_NOEXCEPT
4730
4744
  {
4731
4745
  clear_pending (EV_A_ (W)w);
4732
4746
  if (expect_false (!ev_is_active (w)))
@@ -4749,7 +4763,7 @@ ev_prepare_stop (EV_P_ ev_prepare *w) EV_THROW
4749
4763
 
4750
4764
  #if EV_CHECK_ENABLE
4751
4765
  void
4752
- ev_check_start (EV_P_ ev_check *w) EV_THROW
4766
+ ev_check_start (EV_P_ ev_check *w) EV_NOEXCEPT
4753
4767
  {
4754
4768
  if (expect_false (ev_is_active (w)))
4755
4769
  return;
@@ -4764,7 +4778,7 @@ ev_check_start (EV_P_ ev_check *w) EV_THROW
4764
4778
  }
4765
4779
 
4766
4780
  void
4767
- ev_check_stop (EV_P_ ev_check *w) EV_THROW
4781
+ ev_check_stop (EV_P_ ev_check *w) EV_NOEXCEPT
4768
4782
  {
4769
4783
  clear_pending (EV_A_ (W)w);
4770
4784
  if (expect_false (!ev_is_active (w)))
@@ -4788,7 +4802,7 @@ ev_check_stop (EV_P_ ev_check *w) EV_THROW
4788
4802
  #if EV_EMBED_ENABLE
4789
4803
  noinline
4790
4804
  void
4791
- ev_embed_sweep (EV_P_ ev_embed *w) EV_THROW
4805
+ ev_embed_sweep (EV_P_ ev_embed *w) EV_NOEXCEPT
4792
4806
  {
4793
4807
  ev_run (w->other, EVRUN_NOWAIT);
4794
4808
  }
@@ -4846,7 +4860,7 @@ embed_idle_cb (EV_P_ ev_idle *idle, int revents)
4846
4860
  #endif
4847
4861
 
4848
4862
  void
4849
- ev_embed_start (EV_P_ ev_embed *w) EV_THROW
4863
+ ev_embed_start (EV_P_ ev_embed *w) EV_NOEXCEPT
4850
4864
  {
4851
4865
  if (expect_false (ev_is_active (w)))
4852
4866
  return;
@@ -4877,7 +4891,7 @@ ev_embed_start (EV_P_ ev_embed *w) EV_THROW
4877
4891
  }
4878
4892
 
4879
4893
  void
4880
- ev_embed_stop (EV_P_ ev_embed *w) EV_THROW
4894
+ ev_embed_stop (EV_P_ ev_embed *w) EV_NOEXCEPT
4881
4895
  {
4882
4896
  clear_pending (EV_A_ (W)w);
4883
4897
  if (expect_false (!ev_is_active (w)))
@@ -4897,7 +4911,7 @@ ev_embed_stop (EV_P_ ev_embed *w) EV_THROW
4897
4911
 
4898
4912
  #if EV_FORK_ENABLE
4899
4913
  void
4900
- ev_fork_start (EV_P_ ev_fork *w) EV_THROW
4914
+ ev_fork_start (EV_P_ ev_fork *w) EV_NOEXCEPT
4901
4915
  {
4902
4916
  if (expect_false (ev_is_active (w)))
4903
4917
  return;
@@ -4912,7 +4926,7 @@ ev_fork_start (EV_P_ ev_fork *w) EV_THROW
4912
4926
  }
4913
4927
 
4914
4928
  void
4915
- ev_fork_stop (EV_P_ ev_fork *w) EV_THROW
4929
+ ev_fork_stop (EV_P_ ev_fork *w) EV_NOEXCEPT
4916
4930
  {
4917
4931
  clear_pending (EV_A_ (W)w);
4918
4932
  if (expect_false (!ev_is_active (w)))
@@ -4935,7 +4949,7 @@ ev_fork_stop (EV_P_ ev_fork *w) EV_THROW
4935
4949
 
4936
4950
  #if EV_CLEANUP_ENABLE
4937
4951
  void
4938
- ev_cleanup_start (EV_P_ ev_cleanup *w) EV_THROW
4952
+ ev_cleanup_start (EV_P_ ev_cleanup *w) EV_NOEXCEPT
4939
4953
  {
4940
4954
  if (expect_false (ev_is_active (w)))
4941
4955
  return;
@@ -4952,7 +4966,7 @@ ev_cleanup_start (EV_P_ ev_cleanup *w) EV_THROW
4952
4966
  }
4953
4967
 
4954
4968
  void
4955
- ev_cleanup_stop (EV_P_ ev_cleanup *w) EV_THROW
4969
+ ev_cleanup_stop (EV_P_ ev_cleanup *w) EV_NOEXCEPT
4956
4970
  {
4957
4971
  clear_pending (EV_A_ (W)w);
4958
4972
  if (expect_false (!ev_is_active (w)))
@@ -4976,7 +4990,7 @@ ev_cleanup_stop (EV_P_ ev_cleanup *w) EV_THROW
4976
4990
 
4977
4991
  #if EV_ASYNC_ENABLE
4978
4992
  void
4979
- ev_async_start (EV_P_ ev_async *w) EV_THROW
4993
+ ev_async_start (EV_P_ ev_async *w) EV_NOEXCEPT
4980
4994
  {
4981
4995
  if (expect_false (ev_is_active (w)))
4982
4996
  return;
@@ -4995,7 +5009,7 @@ ev_async_start (EV_P_ ev_async *w) EV_THROW
4995
5009
  }
4996
5010
 
4997
5011
  void
4998
- ev_async_stop (EV_P_ ev_async *w) EV_THROW
5012
+ ev_async_stop (EV_P_ ev_async *w) EV_NOEXCEPT
4999
5013
  {
5000
5014
  clear_pending (EV_A_ (W)w);
5001
5015
  if (expect_false (!ev_is_active (w)))
@@ -5016,7 +5030,7 @@ ev_async_stop (EV_P_ ev_async *w) EV_THROW
5016
5030
  }
5017
5031
 
5018
5032
  void
5019
- ev_async_send (EV_P_ ev_async *w) EV_THROW
5033
+ ev_async_send (EV_P_ ev_async *w) EV_NOEXCEPT
5020
5034
  {
5021
5035
  w->sent = 1;
5022
5036
  evpipe_write (EV_A_ &async_pending);
@@ -5063,7 +5077,7 @@ once_cb_to (EV_P_ ev_timer *w, int revents)
5063
5077
  }
5064
5078
 
5065
5079
  void
5066
- ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg) EV_THROW
5080
+ ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg) EV_NOEXCEPT
5067
5081
  {
5068
5082
  struct ev_once *once = (struct ev_once *)ev_malloc (sizeof (struct ev_once));
5069
5083
 
@@ -5096,7 +5110,7 @@ ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, vo
5096
5110
  #if EV_WALK_ENABLE
5097
5111
  ecb_cold
5098
5112
  void
5099
- ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w)) EV_THROW
5113
+ ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w)) EV_NOEXCEPT
5100
5114
  {
5101
5115
  int i, j;
5102
5116
  ev_watcher_list *wl, *wn;