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

Do global execution context gets off the call stack while browser still fetches something?

I have a code block something like this: function printData(response) { response.json() .then(data => console.log(data.name)); } const fetchedData = fetch("http://localhost:3000/url"); fetchedData.then(printData); console.log("First…
Burak Güneli
  • 114
  • 1
  • 11
0
votes
2 answers

Understanding execution context inside object literal

I am very new to javascript programming, i am trying to understand how javascript program works. Hence i read about concepts like execution context, execution stacks etc. After understanding a bit of execution context i learned that "this" refers to…
Ayush Mishra
  • 267
  • 3
  • 14
0
votes
1 answer

Question about the local and global scope -JavaScipt

First time poster here be gentle to my soul. And also sorry if you don't understand me, I'm not a native English speaker. Here is my code and I'll try to explain what I don't understand below it. var numbers = [1, 2, 3, 4, 5]; var total = 0; i =…
0
votes
1 answer

Clarification on Javascript Execution Context

I've been attempting to solidify my understanding of JS's execution contexts, and am having trouble getting an explanation as to why the code below does not print out "hello world". var foo = "foo"; function test1() { console.log(foo) var…
Jon
  • 1
0
votes
1 answer

basic question about learning Javascript, execution context, stack, closures

Javascript community. Anthony Alicea's course called "Understanding The Weird Parts" (ECMAScript 5), Section 2, video 16: The Scope Chain, I think I found an inconsistency in how the JS interpreter executes functions using the scope chain. I…
bigSloppy
  • 35
  • 5
0
votes
1 answer

Hosting of let, const

/* Hoisting exampe - let */ let a = 100; { console.log(a); // 100 } { console.log(a); // ReferenceError: a is not defined let a = 50; } /* Hoisting took place in {}. */ { let a=100; console.log(a); // 100 } console.log(a); //…
redchicken
  • 311
  • 1
  • 5
  • 18
0
votes
0 answers

Exception: Caused by: org.springframework.batch.core.job.flow.FlowExecutionException java 7 with spring batch

I am getting below exception when adding a few parameters in ExecutionContext that is needed afterJob completion. org.springframework.batch.core.JobExecutionException: Flow execution ended unexpectedly at…
0
votes
1 answer

About thread switching, hopping and thread reuse in TPL with respect to AsyncLocal

When using async/await in TPL, will it reuse idle threads and in theory invoke callbacks on other threads than used initially? About AsyncLocal in this context, will it pass its value around to match the flow or could I end up with a value from…
Andreas Zita
  • 7,232
  • 6
  • 54
  • 115
0
votes
1 answer

Executing an Outside Function Vs. Using a Callback Function -- when to use one or the other?

Callbacks are said to add functionality to higher order functions by passing the value of the callback function (its function definition) -- to the parameter of the 'higher-order' function where it is passed in and executed. It seems we can…
efw
  • 449
  • 3
  • 16
0
votes
1 answer

Accessing JS Class/Object Variables Via Instance Methods and This - Execution Contexts

First Question: Why is the value for this in getXArrow() equal to the Solution object? Shouldn't it equal the this value of the solution object which called it, which would be the Window object? Second Question: Shouldn't the JS Engine travel up the…
0
votes
1 answer

scala akka - Number of threads grows indefinitly even when actors are killed

I'm creating an actor per unit of work. Each actor creates a thread pool. when the work is completed it messages its sender which will inturn send the child actor a poison pill I noticed that the number of threads in the jvm process is still growing…
Avba
  • 14,822
  • 20
  • 92
  • 192
0
votes
1 answer

D365 CE Online - Global Execution Context

While updating all our javascript files for D365 CE (Online), I noticed we have many JS files that are not been called from the form events like OnSave, OnLoad or OnChange. These files are only been called from an internal references by other JS…
Kmria
  • 30
  • 5
0
votes
1 answer

boost context: problems with exception propagation

I'm using boost::context::execution_context (version 2) to write a C++ 11 library and I want to propagate exceptions from an execution_context to the calling execution. I'd like to handle exceptions inside of a lambda that a client gives to my…
0
votes
2 answers

What's difference inner function and parameter function in scope chain?

I know that the execution context of JavaScript is created when a function is called. But I don't understand example below. Example 1 and Example 2 are very similar. However, these results are not the same. I already referenced the…
Mins
  • 11
  • 2
0
votes
1 answer

In these codes,how to explain the output result using execution context?

var obj={ say: function(){ console.log(obj); // undefined }() }; It finally output undefined.And I began to explain it using the knowledge of execution context,but I felt doubt about when the method…
Chor
  • 833
  • 1
  • 5
  • 14