Questions tagged [deferred-execution]

219 questions
1
vote
2 answers

How to use Linq's .Count() method in a conditional statement

I have a thread that periodically checks one of my MS SQL tables for any records that have their "Processed" bit field set to 0. The thread then performs some code using those records and then sets their Processed bits to 1; using it basically as a…
Jaimie Knox
  • 167
  • 2
  • 4
  • 13
1
vote
1 answer

NodeJS wait till all the async commands are completed

I am using 'Q' library to make async calls in NodeJS. However in one of the use cases, I need to defer the promise till all the async calls are completed. public someFunction(files: string[]) : Q.Promise { var needSomeInfo; var…
RaceBase
  • 18,428
  • 47
  • 141
  • 202
1
vote
2 answers

Linq: Xml to IEnumerable> deferred execution?

I'm trying to pull out the Roles below into an IEnumerable>
JSprang
  • 12,481
  • 7
  • 30
  • 32
1
vote
0 answers

Sequence of functions in JavaScript

I have difficulties with the sequence of functions in JavaScript and so far I fail to solve this by myself. After getting a number of results provided by the Bing API, the results' titles and descriptions serve as data for further processing. As an…
1
vote
1 answer

How can I overload a read for a deferred entity in Entity Framework 6?

Given the following code: var time = ctx.Time.First(); var notes = time.Notes.ToList(); This will actually run 2 queries against the database. Basically, I need to tap into the expression tree and do some custom checking to not return records…
Scottie
  • 11,050
  • 19
  • 68
  • 109
1
vote
2 answers

Issue with appengine deferred tasks, execution throws unknown error

I have task deferred in appengine python its a simple call with all task_info strings, list of strings. It works well for any no of tasks. deferred.defer(fetch_service, _queue = "queue_name", …
1
vote
3 answers

How can I force EF to use joins instead of splitting up a complicated query?

I have a complex IQueryable that I would like EF to populate with a single database query so that I can use it with deferred execution. Please consider the following example. For these models: public enum AlphaState { Unknown = '\0', Good = 'G', Bad…
1
vote
3 answers

Deferred execution of List using Linq

Suppose I have a List with 1000 items in it. I'm then passing this to a method that filters this List. As it drops through the various cases (for example there could be 50), List may have up to 50 various Linq Where() operations performed on…
maxp
  • 24,209
  • 39
  • 123
  • 201
1
vote
3 answers

Go - Inconsistent Evaluation of Deferred Functions

I am experimenting with Go and am seeing some unexpected behaviour with deferred functions. Consider the following program that increments a global variable by a given amount. package main import "fmt" var z = 1 func main() { defer…
PassKit
  • 12,231
  • 5
  • 57
  • 75
1
vote
2 answers

Child sProc cannot reference a Local temp table created in parent sProc

On our production SQL2000 instance, we have a database with hundreds of stored procedures, many of which use a technique of creating a #TEMP table "early" on in the code and then various inner stored procedures get EXECUTEd by this parent sProc. In…
John Adams
  • 4,773
  • 25
  • 91
  • 131
1
vote
1 answer

WiX : Windows Service fails to start as App.config is not yet modified

I have created a Windows Service Installer using WiX 3.8, everything works fine except that the service does not start upon installation, I have written a custom action which modifies the app.config with the user input values, the service fails to…
1
vote
1 answer

Service Bus On-Prem - Abandoning deferred messages

Lately I've been working with the Azure Pack & Service Bus for Windows Server 1.1 where I'm doing message deferal with queues. I was wondering if it is possible to abandon a deferred message in order to make it visible to others again? Currently I…
1
vote
2 answers

Javascript/AngularJS - Wait for a callback to finish executing

I have a service called Progress with a method called confirmation that takes Progress.confirmation(message, accepted, rejected); So far the function is: if (!_.isString(message)) { console.warn('No confirmation message was provided'); …
Kousha
  • 32,871
  • 51
  • 172
  • 296
1
vote
2 answers

Entity Framework Execute Expression

Here is simplified code from oi in orderItems group oiGrouped by ... into orderItemsGroupedBySomething select new { Key = orderItemsGroupedBySomething.Key, Revenue = /*Here is some code that I want to extract to…
1
vote
2 answers

what does "until it's realized value is required" in deferred execution means?

I'm just wondering. And been looking in Deferred Execution. It says here http://msdn.microsoft.com/en-us/library/bb943859.aspx that Deferred execution means that the evaluation of an expression is delayed until its realized value is actually…
Boy Pasmo
  • 8,021
  • 13
  • 42
  • 67