Questions tagged [deferred-execution]

206 questions
0
votes
2 answers

Prioritize JavaScript Scripts: Defer Not Working

I need to prioritize scripts so jQuery, Cufon, and my .js files come before Twitter does. I've tried defer="defer" as well as placing scripts in the bottom in the order I want them to execute but all these methods aren't working. I don't want to…
Brandon Wang
  • 2,771
  • 5
  • 26
  • 34
0
votes
2 answers

Enumerable: is "materialize" an official term?

Is "materialize" a good name for a code like this, or is there a better (and official) one? enumerable as ICollection ?? enumerable .ToArray() EDIT: I clarified the code (and its purposes) // or "MaterializeIfNecessary" public static…
Notoriousxl
  • 1,430
  • 1
  • 15
  • 27
0
votes
1 answer

Is it possible to achieve/preserve deferred execution over WCF?

Initially I had a LINQ query (say EF or any other) with expected deffered execution: class Provider : IProvider { public IEnumerable GetSome() { yield return new Any(); // LINQ query } } But now such a provider moved into…
abatishchev
  • 92,232
  • 78
  • 284
  • 421
0
votes
1 answer

Deferred execution strategy in C++

I have a callback implementation in which an unknown third party calls a function pointer in my code. However, an issue in a lot languages is triggering code after a function returns. For instance, when a callback is called and I have to delete the…
Qix - MONICA WAS MISTREATED
  • 12,202
  • 13
  • 73
  • 131
0
votes
1 answer

Deferred execution vs deferred **data source** evaluation

I'm a big fan of deferred execution and all that jazz, but now I got slightly different problem. Consider the following first naïve implementation of a process monitor that simply displays all the processes running on the current machine sorted by…
Fernando Espinosa
  • 3,772
  • 1
  • 24
  • 35
0
votes
2 answers

Doubts about deferred execution

Suppose I have this : IEnumerable StructsTemp; I wrote n queries on StructsTemp, so that it populates from the DB, and so on. Later, I execute them calling .ToList() : IList StructsFinal = StructsTemp.ToList(); ... some queries…
markzzz
  • 44,504
  • 107
  • 265
  • 458
0
votes
1 answer

MessageBox.Show and deferred / delayed update

I'm sorry, I have no idea how to title this question. I've written an explanation for this error about 10 times and then delete it as it isn't clear - forgive me, I'm jumping straight into the code and then will explain public MainWindow() { …
Dave
  • 7,614
  • 10
  • 56
  • 99
0
votes
1 answer

Entity Framework and deferred execution on lazy loaded ICollection

I'm using Entity Framework 4.1 and I have a one to many relationship. When I query the lazy loaded ICollection on the one side of the relationship the whole recordset is returned and it doesn't defer the execution like when I'm querying direct…
Tom Miller
  • 435
  • 6
  • 18
-1
votes
1 answer

Deferred execution again: Local instance of Random inside LINQ query/queries

I wish to understand the following behaviour I stumbled across today. This small program showcases the "problem": class Bar { public int ID { get; set; } } class Foo { public Bar Bar { get; set; } } class Program { private static…
InvisiblePanda
  • 1,519
  • 1
  • 16
  • 37
-3
votes
1 answer

Please explain DEFER's behaivour in golang

As I know, defer is usually used to close or free resources. And using defer FUNC () inside the block (function) of the code ensures that FUNC () will call in case of any return from this block(function) or panic in this block (function). So - how…
Борис
  • 167
  • 1
  • 6
-22
votes
1 answer

How is transforming this iterator block a functional change?

Given the following code snippet: public class Foo { public IEnumerable Sequence { get; set; } public IEnumerable Bar() { foreach (string s in Sequence) yield return s; } } is the following…
Servy
  • 193,745
  • 23
  • 295
  • 406
1 2 3
13
14