Commit graph

168 commits

Author SHA1 Message Date
Viktor Klang
d0717aaec6 #2776 - deprecating and introducing alternatives for methods and parameters ending with '_?' 2012-12-14 14:55:21 +01:00
Roland
6450831e01 #2778 - make thread names unique per system
The MonitorableThreadFactory.copy method does not take into account the
counter:AtomicLong field, which then always starts out at zero for every
new dispatcher; the PinnedDispatcher creates one dispatcher per actor,
hence resulting in identical thread names if used by multiple actors.
Solution: add the counter to the case class’ arguments
2012-12-06 22:58:43 +01:00
Viktor Klang
84aef55846 Roland found a nasty race between activate in supervisor and locally, this commit should fix it, and rename activate to point 2012-11-23 17:53:33 +01:00
Viktor Klang
8f131c680f Switching to immutable.Seq instead of Seq 2012-11-12 14:17:47 +01:00
Roland
e86144499c remove some FIXMEs
some were left-over residue, some were fixed
2012-10-16 12:06:03 +02:00
Roland
0f04239f67 move Duration classes according to scala 2.10 nightly and remove casts to FiniteDuration, see #2504 2012-10-11 15:18:10 -07:00
Patrik Nordwall
614caa2989 Include dispatcher id in thread name of pinned dispatcher, see #2585
* Additional tests
* Moved id append from createExecutorServiceFactory in
  ThreadPoolExecutorConfigurator to ThreadPoolConfig
2012-10-02 11:37:27 +02:00
Roland
35b7a9e338 second round of FiniteDuration business, including cluster fixes
- make Scheduler only accept FiniteDuration, which has quite some
  knock-on effects
2012-09-18 09:58:30 +02:00
Viktor Klang
4eee04cb60 #2469 - Switching to scala.util.Try instead of Either[Throwable, T] in the codebase 2012-09-06 03:17:51 +02:00
Roland
2089fcf84c fix NullMessage handling to not be logged as AutoReceiveMessage 2012-08-21 14:45:13 +02:00
Roland
6ce38537d1 add more explanation for NullMessage 2012-08-21 14:10:37 +02:00
Roland
f0c370cf87 add NullMessage after Supervise to prevent race, see #2418
- parent just checked for system messages and finds none
- Supervise is enqueued to parent
- Failed is enqueued to the parent
- Failed is processed before Supervise and thus dropped due to
  non-matching UID

remedy is to enqueue NullMessage after enqueuing Supervise but before
really starting the actor, so that if NullMessage overtakes Supervise
the loop in processMailbox will then pick up Supervise next
2012-08-21 13:43:57 +02:00
Roland
853faf815c Merge branch 'wip-2363-actor-identity-fail-∂π' 2012-08-09 18:19:08 +02:00
Viktor Klang
7beff1abe7 Merging with master 2012-08-09 17:08:17 +02:00
Roland
c901980340 fix wrong failure processing after child name reuse, see #2363
- every ActorCell has a UID which is generated from ThreadLocalRandom
  and also sent with Supervise and Failed messages, and the supervisor
  simply does not act upon failures from children whose UID does not
  match
2012-08-09 16:43:12 +02:00
Viktor Klang
9d097bcf50 Making it possible/mandatory to signal which ExecutionContext will actually execute something scheduled 2012-08-08 15:57:30 +02:00
Roland
350407f834 Merge branch 'wip-2336-hierarchy-spec-∂π' 2012-08-08 14:31:46 +02:00
Roland
6145d4313b some cleanup after Viktor’s comments
- remove useless `cause` argument from some akka exceptions
- improve names of some method arguments
- eliminate some closure allocation
2012-08-08 14:13:52 +02:00
Roland
810d65068e test exceptions from actor constructor in hierarchy, see #2336
This has brought to light some interesting effects (aka bugs) both in
the general implementation as well as in previous fixes.
SupervisorHierarchySpec is without TODOs now and GREEN.
2012-08-08 07:48:23 +02:00
Viktor Klang
2af08127de Adding support for task batching complete with tests 2012-08-03 23:33:45 +02:00
Roland
dca8d15c68 Merge branch 'wip-2212-recursive-resume-∂π' into wip-scala210M5-√
only merged so that it compiles, will clean up warnings in the following
commits
2012-07-23 14:17:45 +02:00
Viktor Klang
1261fab3af Removing akka.util.NonFatal and replacing it with scala.util.control.NonFatal 2012-07-22 15:33:18 +02:00
Roland
4bbb1dbcbd rename becomeOpen/becomeSuspended to resume/suspend on Mailbox 2012-07-13 12:25:26 +02:00
Roland
1cb204da49 Merge branch 'master' into wip-2212-recursive-resume-∂π
also split out ChildrenContainer into its own file and add
suspendCounter to UnstartedActorCell
2012-07-05 13:18:19 +02:00
Roland
78a39198f1 another round of fixes due to suspend counting, see #2212
- always suspend/resume for Suspend/Resume/Recreate, no matter which
  state the actor is in, to keep the counter balanced
- preRestart failures are logged but otherwise ignored; there’s nothing
  else (apart from terminating the actor) which we could do at that
  point
- preRestart/postRestart exceptions have their own distinguishable
  subtype of ActorKilledException now
- fix some race conditions in tests to make them produce fewer false
  failures
- remove cruft from SupervisorStrategy and add methods which can
  actually be used to implement your own (with proper warning signs)
2012-07-04 09:20:17 +02:00
Viktor Klang
0bf45a9403 Initial work in moving to scala.concurrent.Await + Awaitable 2012-06-29 16:06:26 +02:00
Viktor Klang
54a3a44bf8 #2292 - Removing akka.util.Duration etc and replace it with scala.concurrent.util.Duration 2012-06-29 13:33:20 +02:00
Viktor Klang
1a7f29aaec Making everything compile and tests pass 2012-06-28 15:33:49 +02:00
Viktor Klang
702b5d9c19 Switching to the embedded jsr166y in scala.concurrent and dropping akka.jsr166y 2012-06-26 18:19:55 +02:00
Viktor Klang
7f429ed63e Merge with master 2012-06-25 12:55:25 +02:00
Roland
b60210362e make system.actorOf() non-blocking (and working), see #2031
- introducing RepointableActorRef, which starts out with an
  UnstartedActorCell which can cheaply be created; the Supervise()
  message will trigger child.activate() in the supervisor, which means
  that the actual creation (now with normal ActorCell) happens exactly
  in the right place and with the right semantics. Messages which were
  enqueued to the dummy cell are transferred atomically into the
  ActorCell (using normal .tell()), so message sends keep working
  exactly as they used to
- this enables getting rid of the brittle synchronization around
  RoutedActorRef by replacing that one with a RepointableActorRef
  subclass which creates RoutedActorCells upon activate(), with the nice
  benefit that there is no hurry then to get it right because the new
  cell is constructed “on the side”

misc fixes:

- InvalidMessageException is now actually enforced when trying to send
  “null”
- Mailboxes may be created without having an ActorCell, which can come
  in handy later, because the cell is only needed when this mailbox is
  going to be scheduled on some executor
- remove occurrences of Props(), which is equivalent to Props[Nothing],
  which is equivalent to «bug»
- add test case which verifies that context.actorOf is still synchronous
- plus all the stuff I have forgotten.
2012-06-13 17:57:56 +02:00
Viktor Klang
4ee2033761 Lots and lots of work to get things to compile without warnings 2012-06-13 15:44:24 +02:00
Roland
fd1d0ce121 make cleanUp of systemMessages atomic
- extend systemDrain to take the new contents which shall be switched in
- make NoMessage placeholder which will signal final closing of the
  mailbox
- put that in when cleaning up, and check it when enqueuing
2012-06-04 13:20:53 +02:00
Viktor Klang
1821927023 Merge branch 'wip-2134-deathwatch2.0-√' of github.com:akka/akka into wip-2134-deathwatch2.0-√ 2012-06-04 11:48:40 +02:00
Viktor Klang
2e788c9704 Adding some sanity and some CAS-magic 2012-06-04 11:46:59 +02:00
Viktor Klang
17ee47079a Incorporating Roland's feedback 2012-06-02 14:49:28 +02:00
Viktor Klang
96f264e842 Initial stab at DeathWatch 2.0, tests don't pass just yet 2012-05-28 16:49:49 +02:00
Viktor Klang
b45cec3da4 Preparing Akka Camel for bin compat 2012-05-23 15:17:49 +02:00
Viktor Klang
95db4bfd37 Moving out ConfigurationException from akka.config to akka 2012-05-16 17:04:13 +02:00
Viktor Klang
0eb5c503f5 Changing to the correct gh id for me in the Publish.scala 2012-05-11 16:19:46 +02:00
Viktor Klang
db3ce87917 Removing the Atomic*Updaters from MessageDispatcher, switching to Unsafe all the way baby 2012-05-11 15:00:37 +02:00
Roland
afd81d8506 Revert "closes #2019: Use parentheses for arity-0 methods which are not referentially transparent"
This reverts commit 8dbfbbe966.
2012-05-03 21:14:47 +02:00
Heiko Seeberger
8dbfbbe966 closes #2019: Use parentheses for arity-0 methods which are not referentially transparent 2012-04-24 16:38:21 +02:00
Viktor Klang
3badf25bc0 Hardening the suspend/resume methods so that actorcells with dlqs aren't throwing up 2012-04-03 00:37:09 +02:00
Roland
8a5db512f3 fix shutdown of remote routers, see #1872
- ActorCell.stop(actor) removed the actor from childrenRefs before
  handleChildTerminated, leading to removing from Locker immediately
  after adding it in
- intercept ChildTerminated message in RemoteTransport.receive if
  destination is not found (i.e. isTerminate==true) and re-route to
  Locker, which was changed to support path-based lookup to find the
  parent and funnel the ChildTerminated to its intended destination
- add Locker.shutdown() to detach remaining actors from their
  dispatchers upon system termination.
2012-02-28 15:48:02 +01:00
Roland
eaee16c7d3 include system.settings when constructing MailboxType, see #1864
- necessary to not have to construct one Settings object per
  MessageQueue
- added system.settings to DispatcherPrerequisites
2012-02-26 21:26:25 +01:00
Roland
c84daf83e8 clean up mailbox types configurability, see #1843
- add (config) constructors to std mailbox types
- update docs for prio mailbox to directly implement MailboxType
2012-02-21 16:40:34 +01:00
Viktor Klang
3a1cdab917 Adding union interfaces for ES and EC and E and adding tests to verify signatures 2012-02-16 17:24:08 +01:00
Viktor Klang
607ec4c2cf Switching approaches to check for max throttle 2012-02-13 18:14:35 +01:00
Roland
7c57a9d60e final touch to actor start-up sequence
split systemDispatch(Create()) into systemEnqueue(Create()) directly
after createMailbox and registerForExecution from within
Dispatcher.attach() (resp. CallingThreadDispatcher.register() does its
own thing)
2012-02-13 15:33:31 +01:00