Commit graph

97 commits

Author SHA1 Message Date
Viktor Klang
8bc6513911 Merge branch 'master' into wip-1728-fjpool-√ 2012-01-30 16:08:04 +01:00
Viktor Klang
847a2e1885 Adding support for the ForkJoinPool 2012-01-30 15:34:56 +01:00
Viktor Klang
c1dd4463b9 Restructuring how executors are configured and making sure people can plug in their own 2012-01-30 13:44:56 +01:00
Roland
4fb0858e55 remote cleanup: include feedback from Viktor and Patrik
- re-label Client/Server to Inbound/Outbound for netty settings
  description
- move to just using exactly one class loader for all reflective
  activities of the ActorSystem, which is either the context class
  loader or the one which loaded the ActorSystem’s class; document that
  putting Akka on boot class path will not work
- be more careful with initializing the Client- and ServerBootstrap
- rename Port to DesiredPortFromConfig to discourage misuse
- write test for NettySettings
- various small fixes
2012-01-30 11:57:24 +01:00
Viktor Klang
b045383a72 Changing signature of the createThreadPool in MDC to return the MD 2012-01-27 15:30:24 +01:00
Viktor Klang
9318f700c5 Fixing so that it's possible to add the FJ config to MessageDispatcherConfigurator 2012-01-27 14:58:17 +01:00
Roland
ac1ee9ae91 rework use of ClassLoaders, see #1736 2012-01-27 14:21:54 +01:00
Viktor Klang
42d3328815 Moving tests after first invocation 2012-01-21 01:33:07 +01:00
Viktor Klang
8dfe619140 #1703 & #1693 - moving daemonicity to one place, and in doing so creating a thread factory in ActorSystem 2012-01-20 12:30:19 +01:00
Viktor Klang
d888ca5bff Removing 'name' from dispatchers, just use id, much better 2012-01-19 19:08:51 +01:00
Viktor Klang
149fbea5a7 Updating Copyright as per #1660 2012-01-19 18:21:06 +01:00
Viktor Klang
5006f96348 Moving the creation fo the Create() message to ActorCell 2012-01-17 14:51:21 +01:00
Viktor Klang
e4b6cfbfbe Revering moving of the Create() message, leave it there ;) 2012-01-17 14:39:02 +01:00
Viktor Klang
1756b6aa54 FIXMEs, young grasshopper 2012-01-16 20:18:08 +01:00
Roland
d0498eb32e add Class[_] to LogEvent
- it is customary to use class name for categorizing logs, hence we
  should support it; class is taken from logSource.getClass
- update SLF4J module to use logClass as category and set logSource in
  MDC "akkaSource"
- add docs
2012-01-12 13:29:17 +01:00
Viktor Klang
1f1288ac03 Fixing typeSignature in ExecutionContext 2011-12-30 16:26:30 +01:00
Viktor Klang
2b250f8e4c Added converters from Executor and ExecutorService to ExecutionContext 2011-12-30 15:54:27 +01:00
Viktor Klang
b7cf3e9541 Adding ScalaDoc to ExecutionContext 2011-12-30 13:51:07 +01:00
Viktor Klang
b34dc4c33b Introducing ExecutionContext to MessageDispatcher and attaching it to Future 2011-12-30 13:48:31 +01:00
Viktor Klang
9701685897 Adding support for verifying serializability of Props.creator as well 2011-12-27 17:30:05 +01:00
Viktor Klang
642b3aae2b Making sure it deserializes too 2011-12-27 16:42:42 +01:00
Viktor Klang
5ff8f4e2a4 Verifying serializability of messages when serialize is on 2011-12-27 16:25:26 +01:00
Viktor Klang
8db3f6aa0a Removing mailboxIsEmpty and mailboxSize from MessageDispatcher 2011-12-27 14:43:37 +01:00
Patrik Nordwall
0ff920195c Updated documentation. See #1458 2011-12-21 21:24:57 +01:00
Patrik Nordwall
c4401f1ca8 Changed so that the configured FQCN of the mailboxType must be a MailboxType, not the Mailbox. See #1458 2011-12-21 19:37:18 +01:00
Patrik Nordwall
df260f8939 Improvements based on feedback. See #1458 2011-12-21 19:02:06 +01:00
Patrik Nordwall
f772b0183e Initial commit of dispatcher key refactoring, for review. See #1458
* Changed signatures and constructor of MessageDispatcherConfigurator
* Changed Dispatchers.lookup, keep configurators instead of dispatchers
* Removed most of the Dispatchers.newX methods, newDispatcher is still there because of priority mailbox
* How should we make it easy to configure priority mailbox?
* Changed tons tests
* Documentation and ScalaDoc is not updated yet
* Some tests in ActorModelSpec are temporary ignored due to failure
2011-12-21 13:27:50 +01:00
Patrik Nordwall
60f45c72f6 Move dispatcher-shutdown-timeout to dispatcher config. See #1512. 2011-12-20 13:40:51 +01:00
Patrik Nordwall
61813c6635 Make MailboxType implementation configurable. See #1484
* Added mailboxType property to dispatcher config
* Changed durable mailboxes to use this
* Updated docs for durable mailboxes
2011-12-19 21:41:02 +01:00
Viktor Klang
89e29b07e1 Adding daemonicity to the dispatcher configurator 2011-12-13 20:24:09 +01:00
Roland
92e7693203 Merge remote-tracking branch 'origin/master' into wip-remote-supervision-rk 2011-12-13 16:59:43 +01:00
Jonas Bonér
4d649c3903 Removed all @author tags for Jonas Bonér since it has lost its meaning.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-12-09 18:44:59 +01:00
patriknw
02889404fe Merge pull request #143 from jboner/wip-1435-doc-java-actors-patriknw
Updated documentation of Actors (Java). See #1435
2011-12-09 04:32:24 -08:00
Patrik Nordwall
f28a1f3834 Fixed another shutdown of dispatcher issue. See #1454 2011-12-09 12:16:13 +01:00
Patrik Nordwall
ce128740ab Updated documentation of Actors (Java). See #1435
* Aligned the Java and Scala documentation for Actors
* Implemented hotswap samples in Java, and documented in same way as Scala docs
* Improved Actors (Scala) docs
* Fixed wrong preRestart and postRestart in UntypedActor
* Changed name of Dispatchers.fromConfig to newFromConfig and made it Java friendly
* Added ActorRef.ask with Timeout parameter in addition to the timeoutMillis
2011-12-08 19:30:04 +01:00
Roland
fac840adfc make remote lookup work
- create RemoteActorRef in actorFor
- simplify send/receive because Futures/Exceptions do not go over the
  wire anymore
- add RemoteCommunicationSpec which uses two ActorSystems communicating
  in the same JVM via TCP socket
2011-12-08 14:44:05 +01:00
patriknw
738857ccc2 Merge pull request #137 from jboner/wip-1435-doc-scala-actors-patriknw
Updated documentation of Actors Scala. See #1435
2011-12-07 08:11:06 -08:00
Viktor Klang
72d69cb7cc Moving all the logic for cleaning up mailboxes into the mailbox implementation itself 2011-12-07 15:51:46 +01:00
Patrik Nordwall
5cee76820e Updated documentation of Actors Scala. See #1435 2011-12-07 11:56:58 +01:00
Viktor Klang
aa9b077657 Adding support for range-based setting of pool sizes 2011-12-07 11:25:27 +01:00
Patrik Nordwall
1a93ddb7c0 Merge branch 'master' into wip-1377-context-patriknw 2011-12-07 08:07:58 +01:00
Patrik Nordwall
bfa14a692c Merge branch 'master' into wip-1377-context-patriknw
Conflicts:
	akka-actor/src/main/scala/akka/actor/ActorCell.scala
	akka-actor/src/main/scala/akka/actor/ActorRef.scala
	akka-actor/src/main/scala/akka/dispatch/AbstractDispatcher.scala
	akka-actor/src/main/scala/akka/event/EventStream.scala
	akka-tutorials/akka-tutorial-first/src/main/java/akka/tutorial/first/java/Pi.java
	akka-tutorials/akka-tutorial-first/src/main/scala/Pi.scala
2011-12-07 07:49:34 +01:00
Roland
831b3272ad add min/max bounds on absolute number of threads for dispatcher
The reason for the previously failing test case was that Jenkins has
only two (logical) cores and the test config sets the
core-pool-size-factor to 2, meaning four threads. This is not enough to
have four Futures waiting (as per the test) and one actor which actually
does the work (the guardian in this case). Hence, make it so that
core-pool-size-min gives the absolute minimum and set the default of
that to eight.

While doing so I cleaned up the MessageDispatcherConfigurator to not use
HOF since now configuration items are not optional anymore, yielding a
flow which is much more readily understandable.
2011-12-06 20:39:26 +01:00
Patrik Nordwall
7595e52bc9 Renamed startsWatching to watch, and stopsWatching to unwatch 2011-12-06 09:59:52 +01:00
Roland
9d7597c728 Merge branch master into wip-ActorPath-rk
Had to make Davy Jones a bit more robust, i.e. put him into a different
system to guarantee survival until all messages are delivered.
2011-12-05 22:46:34 +01:00
Roland
1755aedb58 make scheduler shutdown more stringent
- run closeScheduler upon ActorSystem termination (directly)
- this will execute all outstanding tasks (dispatcher shutdowns have
  been queued already, because the last actor has already exited)
- further use of the scheduler (e.g. from tasks just being run) results
  in IllegalStateException
- catch such exceptions in DefaultPromise&MessageDispatcher in case of
  self-rescheduling tasks and execute final action immediately
- also silently stop recurring tasks
2011-12-03 21:26:32 +01:00
Roland
4c1d722398 fix bug in ActorRef.stop() implementation
- it was telling all children to stop(), then waited for the
  ChildTerminated messages and finally terminated itself
- this worked fine, except when the stop came from the supervisor, i.e.
  the recipient was suspended and did not process the ChildTerminated
- so, as the mirror of Supervise() that it is, I changed
  ChildTerminated() to be a system message and instead of stopping
  processing normal messages by checking the stopping flag, just suspend
  the actor while awaiting the ChildTerminated's to flow in.
2011-12-03 18:53:04 +01:00
Patrik Nordwall
1f665ab4c6 Changed signatures of Scheduler for better api of by-name blocks 2011-12-02 17:13:46 +01:00
Patrik Nordwall
b488d70f54 Fixed several memory and thread leaks. See #1404
* Dispatchers need Scheduler to be able to shutdown themselves. Stop Scheduler after dispatchers.
* Changed CallingThreadDispatcher global object to Extension, since it holds map of references to mailboxes. Will be GC:ed when system is GC:ed.
* Made testActor lazy, since it is not used in all tests, and it creates CallingThreadDispatcher.
* Activated some java tests that were not running
* Many tests were not stopping created ActorSystems. VERY IMPORTANT TO STOP ActorSystem in tests. Use AkkaSpec as much as possible.
* Used profiler to verify (and find) dangling ActorSystemImpl and threads from dispatchers.
* FutureSpec creates ForkJoinPool threads that are not cleared, but number of threads don't grow so it's not a problem.
2011-12-02 09:48:21 +01:00
Patrik Nordwall
80ac1737cd First walk throught of FIXME. See #1378
* Fixed obvious
* Created tickets for several, #1408, #1409, #1410, #1412, #1415, 1416, #1418
* Moved LoggingReceive from akka.actor to akka.event
* Touched several of the FIXME to make them visible in code review
2011-11-30 10:48:26 +01:00