Commit graph

197 commits

Author SHA1 Message Date
Viktor Klang
439be7d99a =act #16152 - Elides the need to allocate an AkkaForkJoinTask for Mailbox-submission to registerForExecution,
by having Mailbox extend ForkJoinTask and using the fact that ForkJoinTask.exec when returning
false does not set completion on the task, so it is free to be resubmitted to the ForkJoinPool
without reinitialization.

Also adds the ability to use fork() when the currentThread is a worker thread of the pool that we want to execute on.

Adds a JMH benchmark for both the ping-pong performance and pipelined throughput.

Conflicts:
	project/AkkaBuild.scala
2014-10-29 15:04:48 +01:00
Patrik Nordwall
813543e8f8 +act,slf #11715 Add configurable LoggingFilter
* The filter is used by the LoggingAdapter before publishing
  to the event bus
* Slf4jLoggingFilter uses backend log level configuration
  (e.g. logback.xml)
2014-08-11 20:08:44 +02:00
Roland Kuhn
7ac37e7536 Merge pull request #1970 from akka/wip-improved-batching-executor-√
=act - Refactored the BatchingExecutor to support both managed blocking ...
2014-04-15 11:27:12 +02:00
Adam Voss
cce29dfa51 Changes all occurances of Typesafe copyright to extend to 2014. 2014-02-04 21:20:09 -06:00
Viktor Klang
52408c7d7c =act - Refactored the BatchingExecutor to support both managed blocking and not. 2014-01-27 16:08:49 +01:00
Dario Rexin
4b2d98c5cb +act #2075 Added possibility to pass an ExecutionContext to an ActorSystem 2014-01-16 23:24:06 +01:00
Patrik Nordwall
bfbee94fec Merge pull request #1916 from akka/wip-3809-config-1.1-patriknw
!pro #3809 Update to config 1.2.0
2014-01-16 00:23:27 -08:00
Patrik Nordwall
e441d1b29b !pro #3809 Update to config 1.2.0
* Changed all duration reads to use implicit conversion
  and the new getDuration to reduce boilerplate
2014-01-15 19:26:47 +01:00
Patrik Nordwall
0ae785beb5 +act #3591 Return ExecutionContextExecutor from context.dispatcher 2014-01-13 09:31:36 +01:00
Björn Antonsson
208b566551 =act #3720 Optimze actor creation speed and actor size 2013-12-12 09:06:29 +01:00
Roland
20eb28a03c move deadLetterMailbox into Mailboxes and fix review comments, see #3342 2013-06-03 11:41:11 +02:00
Roland
f317aaf711 rewrite mailbox selection logic, see #3342
- add “mailbox-requirement” key to dispatcher section
- split out mailbox section, add akka.actor.default-mailbox
- rewrite findMarker method and use it for Props.create() and getting
  the required mailbox of an actor
- add ProducesMessageQueue trait for MailboxType so that requirements
  can be checked before trying to create the actor for real
- verify actor as well as dispatcher requirements for message queue
  before creation, even in remote-deployed case
- change MessageDispatcher constructor to take a Configurator, add that
  to migration guide
2013-06-02 12:32:04 +02:00
Roland
d10281d0e4 fix some FIXMEs, see #3192
- remove some outdated ones (which were already fixed but not removed)
- make socket options fully configurable in NettyTransport
- also apply socket options to outbound connections, not only the listen
  socket
- remove timeout from taking the lock in RepointableActorRef, because we
  cannot afford to lose system messages anymore, so we should rather
  block the sender
2013-05-28 13:29:09 +02:00
Roland
738796c625 remove NullMessage, see #3281 2013-05-02 18:48:36 +02:00
Björn Antonsson
c3eed374f1 Allow different types of mailboxes on the same dispatcher. See #2687 2013-04-19 13:42:58 +02:00
Viktor Klang
c883705242 #3018 - Enabling -Xlint and dealing with the situation that occurs 2013-03-29 01:43:17 +01:00
Endre Sándor Varga
f8c3717ca1 Changed Failed to be a SystemMessage
- Moved system messages to their own package.
 - All queueing operations are now hidden behind a SystemMessageList value class
 - Introduced dual SystemMessageList types to encode the ordering in the type.
   - Protects against accidentally missed reverse calls or accidentally reversed lists
   - Makes ordering expectations by fields/parameters explicit
 - Fixed serialization tests
 - Fixes to logging in HierarchyStressSpec
2013-03-22 12:02:31 +01:00
Patrik Nordwall
b738487dc8 Add UID to RemoteActorRef, see #3072
* Sending to a previous incarnation of an actor shall fail,
  to make remote actors work the same way as local ones (in
  the sense that after Terminated() the ref is not working anymore)
* Changed equality of ActorRef to take the uid into account
* Parse uid fragment in RelativeActorPath and ActorPathExtractor
* Handle uid in getChild and in RemoteSystemDaemon
* Use toSerializationFormat and toSerializationFormatWithAddress
  in serialization
* Replaced var uid in ActorCell and ChildRestartStats with
  constructor parameters (path)
* Create the uid in one single place, in makeChild in parent
* Handle ActorRef with and without uid in DeathWatch
* Optimize ActorPath.toString and friends
* Update documentation and migration guide
2013-03-21 20:25:16 +01:00
Patrik Nordwall
0f01ffe3a0 Add fail fast checks to prevent null message, see #2800
(cherry picked from commit 5526f9d2a8b01f944ff078ce57f2a03c21649d05)

* Added null check in Envelope.apply
2013-02-20 13:36:42 +01:00
Viktor Klang
e519e3dc3b #2986 - Changing ActorContext and ActorRefFactory's dispatcher to return ExecutionContext 2013-01-31 15:41:31 +01:00
Viktor Klang (√)
664ab76bf5 Merge pull request #1085 from akka/wip-2974-escalate-uncaught-exceptions-√
Making sure that the current Threads' UEH is called when using Akka FJP ...
2013-01-29 03:21:22 -08:00
Viktor Klang
ff540d76ec Making sure that the current Threads' UEH is called when using Akka FJP in Dispatcher as ExecutionContext 2013-01-29 11:26:06 +01:00
Björn Antonsson
3116c7d4c4 Merge pull request #1078 from akka/wip-2919-master-we-get-lingering-dispatchers-ban
Forward port of #2919 Keep the dispatcher inhabitants count balanced.
2013-01-29 02:17:25 -08:00
Björn Antonsson
bd25c94445 Keep the dispatcher inhabitants count balanced. See #2919
Conflicts:
	akka-remote/src/test/scala/akka/remote/UntrustedSpec.scala
2013-01-28 15:06:14 +01:00
Rich Dougherty
7b3ec79c0c Make it easer to override SystemMessage serialization. Fixes #2940
* Make SystemMessage extend Serializable to avoid ambiguity when
    setting serialization-bindings.
  * Set serialVersionUID in SystemMessages and create tests to
    ensure binary formats remain unchanged.
  * Add tests for reference.conf's serialization settings.
  * Make some existing serialization tests more robust.

Removed boilerplate from serialization tests

Use actual reference.conf; tidy up

Make serialization compatible
2013-01-28 13:23:52 +13:00
Patrik Nordwall
db5da848c0 Merge pull request #1033 from akka/wip-def-if-patriknw
Style change of def starting with if
2013-01-18 04:30:43 -08:00
Patrik Nordwall
5dc108567d Style change of def starting with if
* When a def starts with if and is not a oneliner the if
  should be on a new line.
* The reason is that it might be easy to miss the if when
  reading the code.
2013-01-18 13:28:49 +01:00
Viktor Klang
c38be1bc4a Preserving Envelopes in UnstartedActorCell as requested by Mr Pink 2013-01-18 12:17:32 +01:00
Viktor Klang
adfeb2c1f0 #2879 - updating copyright info 2013-01-09 11:38:00 +01:00
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