Questions tagged [deferred-execution]

219 questions
0
votes
5 answers

Do something after method returns

This is my situation in pseudocode: function onRequest() { receiveConnectionRequest(); response = function onConnect() { playersConnected++; if (playersConnected == 4) { sendAllPlayersTheirCards() } …
Bart van Heukelom
  • 43,244
  • 59
  • 186
  • 301
0
votes
0 answers

Executing custom action after showing the UI in wix installer

I have written a custom action which i want to execute after showing the UI of Next dialog to the user. Then I want to show the next dialog after execution of that custom action without any next button. The scenario is like, on click of Next Button…
0
votes
4 answers

Loop through changing dataset with inlineCallbacks/yield (python-twisted)

I have a defer.inlineCallback function for incrementally updating a large (>1k) list one piece at a time. This list may change at any time, and I'm getting bugs because of that behavior. The simplest representation of what I'm doing…
Ng Oon-Ee
  • 1,193
  • 1
  • 10
  • 26
0
votes
0 answers

Defer loading of Javascript approach in asp.net mvc

I'm going to implement Defer loading of JavaScript approach because as per current structure JavaScript is being called in element which is taking long response time. So I just want to add this JavaScript after complete DOM load. Here is code…
0
votes
0 answers

How do I always get synchronous execution function with a use deferred object?

In my task I want to wait for an asynchronous execution of the function and only then output the result. How can I do this, if my attempts in the code do not work? CanPrintVS(): boolean { var result = false; // at this point I want to…
0
votes
1 answer

Check if return type is IEnumerable

How can I check if the return type of a function is IEnumerable? In other words, I don't want to match List, even though it implements IEnumerable. Or put even another way, how can I detect if a function has deferred execution?
Nelson Rothermel
  • 9,436
  • 8
  • 62
  • 81
0
votes
1 answer

How do i implement this pattern in node js?

I am writing a data access layer where in my dalmethod will be called & after work is done by the callers, I have to close the db. I dont want to bother the callers for closing my db (or performing some other operations). Basically i am looking out…
Abdul Rehman Sayed
  • 6,532
  • 7
  • 45
  • 74
0
votes
1 answer

Meteor script ensured to be executed before everything else (on Client)

I guess the topic of Meteor forcing execution order heuristics on its users instead of providing import semantics has been discussed to death already. Nevertheless, I think there should at the very least be a way to make 100% sure that a certain set…
Domi
  • 22,151
  • 15
  • 92
  • 122
0
votes
2 answers

Is there a built-in C# type that allows deferred execution, but not casting back to IQueryable?

Is there a recommended built-in type in C# that collections can be converted/cast to that will still allow deferred execution, but not allow the type to be cast back into IQueryable? (Like IEnumerable can in some cases)
adam0101
  • 29,096
  • 21
  • 96
  • 174
0
votes
1 answer

What is the best way to defer code execution?

I have many methods calling each other that each have to certain tasks, some of them asynchronous, that all operate on a DOM (so only one thread must access the DOM at any time). For example: object A() { /*...A() code 1...*/ var res = B(); …
manixrock
  • 2,533
  • 4
  • 24
  • 29
0
votes
1 answer

How to interpret this execution plan (IN vs EXISTS)?

It looks like from the execution plan the IN version is faster than EXISTS version I'm thinking that EXISTS query is faster, for it eagerly checks the conditions. The IN query though it looks intuitive, I feel that it seems it resolves the final…
Michael Buen
  • 38,643
  • 9
  • 94
  • 118
0
votes
1 answer

dispatch.yaml not always routing Deferred Task Queues to correct module

I have a dispatch.yaml file that is supposed to route deferred Task Queue requests on the /_ah/queue/deferred path to a module instance with more memory. However, the requests are not consistently being routed. See this doc page for a primer on…
speedplane
  • 15,673
  • 16
  • 86
  • 138
0
votes
3 answers

Unable to cast object of type 'System.Int32' to type 'System.String' in LINQ query

Hi I'm trying to remove a user from my database. I'm not sure why I'm receiving this error though since none of my variables (employeeName, departmentName) are of type int. The debugger keeps stopping at this block of code with the "Unable to cast…
coder123
  • 47
  • 2
  • 10
0
votes
1 answer

Execute IQueryable after it's being done building

I want to build filters on IQueryable depending on user input and execute the query only at the end. I'm trying to understand concept behind and if this is going to work as expected. Will the query below hit database on return…
skmasq
  • 4,470
  • 6
  • 42
  • 77
0
votes
1 answer

Safely Execute posted javascript from node.js

I writing a webscaping api in Node.js, It simple structure takes in a website url, page iteration function, and Element Source Selector. The page iteration function is ofcourse Javascript. So I was wonder if there is a safe way to execute their…
johnny 5
  • 19,893
  • 50
  • 121
  • 195