celluloid 0.1.0 → 0.2.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.
@@ -35,6 +35,11 @@ module Celluloid
35
35
  "#<Celluloid::Actor(#{@actor.class}:0x#{@actor.object_id.to_s(16)}) dead>"
36
36
  end
37
37
 
38
+ # Create a Celluloid::Future which calls a given method
39
+ def future(method_name, *args, &block)
40
+ Celluloid::Future.new { __call method_name, *args, &block }
41
+ end
42
+
38
43
  # Terminate the associated actor
39
44
  def terminate
40
45
  raise DeadActorError, "actor already terminated" unless alive?
@@ -63,6 +68,10 @@ module Celluloid
63
68
  __call(meth, *args, &block)
64
69
  end
65
70
 
71
+ #######
72
+ private
73
+ #######
74
+
66
75
  # Make a synchronous call to the actor we're proxying to
67
76
  def __call(meth, *args, &block)
68
77
  our_mailbox = Thread.current.mailbox
@@ -1,5 +1,5 @@
1
1
  !RBIX
2
- 3578385345186687227
2
+ 3246536075095810518
3
3
  18
4
4
  M
5
5
  1
@@ -128,7 +128,7 @@ x
128
128
  10
129
129
  ActorProxy
130
130
  i
131
- 150
131
+ 168
132
132
  5
133
133
  66
134
134
  5
@@ -278,6 +278,24 @@ i
278
278
  49
279
279
  5
280
280
  4
281
+ 15
282
+ 5
283
+ 48
284
+ 24
285
+ 15
286
+ 99
287
+ 7
288
+ 25
289
+ 7
290
+ 26
291
+ 65
292
+ 67
293
+ 49
294
+ 4
295
+ 0
296
+ 49
297
+ 5
298
+ 4
281
299
  11
282
300
  I
283
301
  5
@@ -291,7 +309,7 @@ I
291
309
  0
292
310
  n
293
311
  p
294
- 24
312
+ 27
295
313
  x
296
314
  7
297
315
  mailbox
@@ -836,6 +854,160 @@ x
836
854
  p
837
855
  0
838
856
  x
857
+ 6
858
+ future
859
+ M
860
+ 1
861
+ n
862
+ n
863
+ x
864
+ 6
865
+ future
866
+ i
867
+ 15
868
+ 95
869
+ 19
870
+ 2
871
+ 15
872
+ 45
873
+ 0
874
+ 1
875
+ 43
876
+ 2
877
+ 56
878
+ 3
879
+ 50
880
+ 4
881
+ 0
882
+ 11
883
+ I
884
+ 5
885
+ I
886
+ 3
887
+ I
888
+ 1
889
+ I
890
+ 0
891
+ I
892
+ 1
893
+ I
894
+ 1
895
+ p
896
+ 5
897
+ x
898
+ 9
899
+ Celluloid
900
+ n
901
+ x
902
+ 6
903
+ Future
904
+ M
905
+ 1
906
+ p
907
+ 2
908
+ x
909
+ 9
910
+ for_block
911
+ t
912
+ n
913
+ x
914
+ 6
915
+ future
916
+ i
917
+ 27
918
+ 5
919
+ 21
920
+ 1
921
+ 0
922
+ 21
923
+ 1
924
+ 1
925
+ 36
926
+ 21
927
+ 1
928
+ 2
929
+ 13
930
+ 70
931
+ 10
932
+ 22
933
+ 44
934
+ 43
935
+ 0
936
+ 12
937
+ 49
938
+ 1
939
+ 1
940
+ 47
941
+ 51
942
+ 2
943
+ 1
944
+ 11
945
+ I
946
+ 6
947
+ I
948
+ 0
949
+ I
950
+ 0
951
+ I
952
+ 0
953
+ I
954
+ 0
955
+ I
956
+ -2
957
+ p
958
+ 3
959
+ x
960
+ 4
961
+ Proc
962
+ x
963
+ 14
964
+ __from_block__
965
+ x
966
+ 6
967
+ __call
968
+ p
969
+ 3
970
+ I
971
+ 0
972
+ I
973
+ 28
974
+ I
975
+ 1b
976
+ x
977
+ 54
978
+ /Users/tony/src/celluloid/lib/celluloid/actor_proxy.rb
979
+ p
980
+ 0
981
+ x
982
+ 3
983
+ new
984
+ p
985
+ 5
986
+ I
987
+ -1
988
+ I
989
+ 27
990
+ I
991
+ 4
992
+ I
993
+ 28
994
+ I
995
+ f
996
+ x
997
+ 54
998
+ /Users/tony/src/celluloid/lib/celluloid/actor_proxy.rb
999
+ p
1000
+ 3
1001
+ x
1002
+ 11
1003
+ method_name
1004
+ x
1005
+ 4
1006
+ args
1007
+ x
1008
+ 5
1009
+ block
1010
+ x
839
1011
  9
840
1012
  terminate
841
1013
  M
@@ -909,11 +1081,11 @@ p
909
1081
  I
910
1082
  -1
911
1083
  I
912
- 27
1084
+ 2c
913
1085
  I
914
1086
  0
915
1087
  I
916
- 28
1088
+ 2d
917
1089
  I
918
1090
  15
919
1091
  I
@@ -921,7 +1093,7 @@ I
921
1093
  I
922
1094
  16
923
1095
  I
924
- 29
1096
+ 2e
925
1097
  I
926
1098
  1c
927
1099
  x
@@ -1217,23 +1389,23 @@ p
1217
1389
  I
1218
1390
  -1
1219
1391
  I
1220
- 2d
1392
+ 32
1221
1393
  I
1222
1394
  4
1223
1395
  I
1224
- 2f
1396
+ 34
1225
1397
  I
1226
1398
  20
1227
1399
  I
1228
- 30
1400
+ 35
1229
1401
  I
1230
1402
  40
1231
1403
  I
1232
- 31
1404
+ 36
1233
1405
  I
1234
1406
  4c
1235
1407
  I
1236
- 34
1408
+ 39
1237
1409
  I
1238
1410
  83
1239
1411
  I
@@ -1241,7 +1413,7 @@ I
1241
1413
  I
1242
1414
  88
1243
1415
  I
1244
- 35
1416
+ 3a
1245
1417
  I
1246
1418
  9e
1247
1419
  I
@@ -1249,11 +1421,11 @@ I
1249
1421
  I
1250
1422
  a2
1251
1423
  I
1252
- 3c
1424
+ 41
1253
1425
  I
1254
1426
  a6
1255
1427
  I
1256
- 2f
1428
+ 34
1257
1429
  I
1258
1430
  a7
1259
1431
  I
@@ -1261,7 +1433,7 @@ I
1261
1433
  I
1262
1434
  a8
1263
1435
  I
1264
- 3f
1436
+ 44
1265
1437
  I
1266
1438
  c0
1267
1439
  x
@@ -1285,6 +1457,9 @@ x
1285
1457
  11
1286
1458
  our_mailbox
1287
1459
  x
1460
+ 7
1461
+ private
1462
+ x
1288
1463
  6
1289
1464
  __call
1290
1465
  M
@@ -1653,11 +1828,11 @@ p
1653
1828
  I
1654
1829
  0
1655
1830
  I
1656
- 52
1831
+ 5b
1657
1832
  I
1658
1833
  4
1659
1834
  I
1660
- 53
1835
+ 5c
1661
1836
  I
1662
1837
  1b
1663
1838
  x
@@ -1699,19 +1874,19 @@ p
1699
1874
  I
1700
1875
  -1
1701
1876
  I
1702
- 43
1877
+ 4c
1703
1878
  I
1704
1879
  4
1705
1880
  I
1706
- 44
1881
+ 4d
1707
1882
  I
1708
1883
  10
1709
1884
  I
1710
- 45
1885
+ 4e
1711
1886
  I
1712
1887
  3b
1713
1888
  I
1714
- 48
1889
+ 51
1715
1890
  I
1716
1891
  4c
1717
1892
  I
@@ -1719,11 +1894,11 @@ I
1719
1894
  I
1720
1895
  51
1721
1896
  I
1722
- 49
1897
+ 52
1723
1898
  I
1724
1899
  5e
1725
1900
  I
1726
- 4a
1901
+ 53
1727
1902
  I
1728
1903
  71
1729
1904
  I
@@ -1731,15 +1906,15 @@ I
1731
1906
  I
1732
1907
  75
1733
1908
  I
1734
- 4d
1909
+ 56
1735
1910
  I
1736
1911
  7d
1737
1912
  I
1738
- 4f
1913
+ 58
1739
1914
  I
1740
1915
  89
1741
1916
  I
1742
- 52
1917
+ 5b
1743
1918
  I
1744
1919
  92
1745
1920
  I
@@ -1747,27 +1922,27 @@ I
1747
1922
  I
1748
1923
  93
1749
1924
  I
1750
- 57
1925
+ 60
1751
1926
  I
1752
1927
  95
1753
1928
  I
1754
- 58
1929
+ 61
1755
1930
  I
1756
1931
  a0
1757
1932
  I
1758
- 59
1933
+ 62
1759
1934
  I
1760
1935
  a7
1761
1936
  I
1762
- 5a
1937
+ 63
1763
1938
  I
1764
1939
  b2
1765
1940
  I
1766
- 5b
1941
+ 64
1767
1942
  I
1768
1943
  bf
1769
1944
  I
1770
- 5d
1945
+ 66
1771
1946
  I
1772
1947
  d2
1773
1948
  I
@@ -1798,7 +1973,7 @@ x
1798
1973
  8
1799
1974
  response
1800
1975
  p
1801
- 23
1976
+ 27
1802
1977
  I
1803
1978
  2
1804
1979
  I
@@ -1838,13 +2013,21 @@ I
1838
2013
  I
1839
2014
  7a
1840
2015
  I
1841
- 2d
2016
+ 2c
1842
2017
  I
1843
2018
  88
1844
2019
  I
1845
- 43
2020
+ 32
1846
2021
  I
1847
2022
  96
2023
+ I
2024
+ 48
2025
+ I
2026
+ 9a
2027
+ I
2028
+ 4c
2029
+ I
2030
+ a8
1848
2031
  x
1849
2032
  54
1850
2033
  /Users/tony/src/celluloid/lib/celluloid/actor_proxy.rb