Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
pitr-ch committed May 7, 2018
1 parent e680f23 commit 230416b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/concurrent/actor/core.rb
Expand Up @@ -90,6 +90,7 @@ def remove_child(child)
# can be called from other alternative Reference implementations
# @param [Envelope] envelope
def on_envelope(envelope)
log(DEBUG) { "is #{envelope.future ? 'asked' : 'told'} #{envelope.message.inspect} by #{envelope.sender}" }
schedule_execution do
log(DEBUG) { "was #{envelope.future ? 'asked' : 'told'} #{envelope.message.inspect} by #{envelope.sender}" }
process_envelope envelope
Expand Down
2 changes: 2 additions & 0 deletions lib/concurrent/executor/java_executor_service.rb
Expand Up @@ -10,6 +10,7 @@ module Concurrent
# @!visibility private
class JavaExecutorService < AbstractExecutorService
java_import 'java.lang.Runnable'
include Concern::Logging

FALLBACK_POLICY_CLASSES = {
abort: java.util.concurrent.ThreadPoolExecutor::AbortPolicy,
Expand All @@ -26,6 +27,7 @@ def initialize(*args, &block)
def post(*args, &task)
raise ArgumentError.new('no block given') unless block_given?
return handle_fallback(*args, &task) unless running?
log DEBUG, 'java-executor', args: args, task: task#, caller: caller
@executor.submit_runnable Job.new(args, task)
true
rescue Java::JavaUtilConcurrent::RejectedExecutionException
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Expand Up @@ -22,7 +22,7 @@
require 'concurrent'
require 'concurrent-edge'

Concurrent.use_simple_logger Logger::FATAL
Concurrent.use_simple_logger Logger::DEBUG

require_relative 'support/example_group_extensions'
require_relative 'support/less_than_or_equal_to_matcher'
Expand Down

0 comments on commit 230416b

Please sign in to comment.