Questions tagged [executioncontext]

Refers to concept of an environment where code is evaluated and executed. This refers to global and function execution contexts, how control is switched between, how binding occurs in context etc.

Execution context is abstract concept of programming and is closely related to executing code itself and order how it will executed (execution stack), how pointers to objects are created and used and how they're divided from each other. Because of abstract nature of concept itself Execution context is closely tied to particular implementation in programming languages (Javascript for example). Check related tags

Resources

Related tags

196 questions
0
votes
0 answers

Where is this binding resides and what is the difference in es6 and es5 ECMAScript definitions to those?

I just went through the documentation of ECMAScript 2018 [https://www.ecma-international.org/ecma-262/9.0/index.html#sec-lexical-environments] and ECMAScript 2015 [http://www.ecma-international.org/ecma-262/6.0/#sec-lexical-environments] to…
0
votes
1 answer

Destructuring assignment in for...of loop and execution context in Javascript

I want to get deep understanding of the for...of loops and destructuring assignment in JS. The following code throw an error on line 3: "ReferenceError: y is not defined", but "y" is defined just before the for loop statement. What's the…
0
votes
0 answers

is Google V8 an environment in whish our code runs, so we can call it an execution context right?

please i'm struggling a lot these days to understand how the javascript works behind the scenes so it is Google V8 an environment in whish our code runs, so we can call it an execution context right?
0
votes
2 answers

JavaScript Global Execution Context

function callDad () { var numb = '0122822122'; console.log('Calling ' + numb); } callDad(); 1) Since the function callDad is declared globally it is saved in the global execution context before being invoked. 2) Once the function…
Ash
  • 1
  • 1
0
votes
1 answer

TypeScript: "Outsourcing" methods. The clean way

I'm currently working on a class I am using as middleware in express. Before i go into the class keep in mind that i will be injecting the middleware later by first creating an instance of my Class "Authenticator" and then injecting it's method…
relief.melone
  • 3,042
  • 1
  • 28
  • 57
0
votes
0 answers

Monitor Global Execution Context

let's assume that I have a large system which uses Scala Global Execution Context in many places to execute different Futures. And one day in this system occurred the performance problem (Memory dump analysis pointed out that the reason was too many…
0
votes
1 answer

.net core AsyncLocal loses context with System.Reactive

I want to use AsyncLocal to pass information through async workflows for tracing purpose. Now i faced a problem with RX. Thios is my test code: using System; using System.Reactive.Linq; using System.Reactive.Subjects; using System.Threading; using…
0
votes
0 answers

Why is Visual VM showing a thread as parked when it is getting scheduled?

I have created a custom Execution Context (FixedThreadPool with 100 workers) in Scala to run IO Bound Futures. I am making db calls to Cassandra in these futures. I have made the context available to the DB related Futures. In the log messages I see…
Utsav
  • 536
  • 2
  • 6
  • 18
0
votes
0 answers

How to find the execution context object name in javascript?

I have below code trying to display the context from where checkObj() is invoked. For example, I need to see the output as 'a' since checkObj is invoked as a.checkObj(). Currently, only the type of 'this' is displayed i.e., Object{} function…
Sami Kh
  • 117
  • 2
  • 14
0
votes
1 answer

How to use http client in an Akka actor that has a service?

I have an akka actor, and I would like to use a simple service inside that actor. That service should use the client side api's singleRequest method to fetch something from the local network. My Actor: package actor import…
handris
  • 1,999
  • 8
  • 27
  • 41
0
votes
1 answer

Async Controller with PlayFramework 2.6

I am using a Future.successful with the Action.async in playframework 2.6 with scala: Code package controllers import com.google.inject.Inject import play.api.Configuration import play.api.libs.ws.{WSClient} import play.api.libs.oauth.{ConsumerKey,…
vamsiampolu
  • 6,328
  • 19
  • 82
  • 183
0
votes
1 answer

Scala Future blocks transformations?

I have the following test code snippet: import scala.concurrent.{Await, Future} import scala.concurrent.duration.Duration import scala.util.Success import scala.concurrent.ExecutionContext.Implicits.global object FutureAndThen extends App { val…
Andrii Abramov
  • 10,019
  • 9
  • 74
  • 96
0
votes
2 answers

ExecutionContext causes Akka dead letter

For some reason I have to use gRPC and Akka at the same time. When this actor is started as a top actor, nothing goes wrong (in this little demo). But when it becomes a child actor, it cannot receive any messages, and the following is…
Skye347
  • 35
  • 6
0
votes
1 answer

Spring Batch ExecutionContext deserialization for PostGreSQL JOB_EXECUTION_CONTEXT failing

I am trying to create a Spring Batch POC with Java Configuration and PostGreSQL. I have successfully created beans that would have otherwise been provided via the in memory DB using @EnableBatchProcessing and @EnableAutoConfiguration. I am not able…
0
votes
0 answers

How to force methods run in `ExecutionContext`?

How can I run methods from inside a specific ExecutionContext only? For example, consider this code: trait SomeTrait { private var notThreadSafe = 0 // mutable var! def add(i: Int) = ??? def subtract(i: Int) = ??? } This code is only correct…
VasiliNovikov
  • 9,681
  • 4
  • 44
  • 62