Questions tagged [dispatch]

Dynamic dispatch (also known as dynamic binding) is the process of mapping a message to a specific sequence of code (method) at runtime. This is done to support the cases where the appropriate method cannot be determined at compile-time (i.e. statically).

Dynamic dispatch is only used for code invocation and not for other binding processes (such as for global variables) and the name is normally only used to describe a language feature where a runtime decision is required to determine which code to invoke.

This Object-Oriented feature allows substituting a particular implementation using the same interface, and therefore it enables polymorphism.

http://en.wikipedia.org/wiki/Dynamic_dispatch

974 questions
0
votes
4 answers

How to detect two different queries are completed to then call another function in swift?

My function runsQueries runs two different queries. And i need these two queries to be completed before I can call updateResults function. What is the best approach to get it done? I've tried a few different things but nothing actually worked so…
GuiSoySauce
  • 1,763
  • 3
  • 24
  • 37
0
votes
0 answers

dispatch_group_notify never called

I have the code outlined below, but the final call to dispatch_group_notify never occurs // Get friends: dispatch_group_enter(self.dbGetQueue) getFriends.observeSingleEventOfType(.Value, withBlock: { snapshot in for…
Sauron
  • 6,399
  • 14
  • 71
  • 136
0
votes
1 answer

Aggregate resource requests & dispatch responses to each subscriber

I'm fairly new to RxJava and struggling with an use case that seems quite common to me : Gather multiple requests from different parts of the application, aggregate them, make a single resource call and dispatch the results to each subscriber. I've…
Eric Palle
  • 18
  • 4
0
votes
1 answer

How to wait until a asynchronous function finish running then only run continue another function in swift?

My problem is that , I have a function that i would like it to finish running all code before continue to another function . While running i hope that i can do other stuff like change view . I run my current fucntion and it is Asynchronous and it…
user5892150
0
votes
2 answers

About functions dispatch in python3

I want to do functions dispatch, but there is no switch mechanism in python 3. I learn to use dict for instead like below: def multiply(m,n,o): return m*n*o def add(m,n): return m+n my_math = { "+":add, …
0
votes
1 answer

How to use the "var[].function()" caller dispatch?

I am trying to learn how to dispatch an action that is related to an element of a dictionary. I´ve seen a lot of times the formula dictionary[element].function(), and there the function calls the element of the dictionary. I am trying to do that…
Ruben Medrano
  • 161
  • 2
  • 10
0
votes
1 answer

Convert InvokeRequired to Dispatch in VB WPF

Hello I'm stuck on the last section of my code in which I'm converting from standard VB to VB WPF I was originally using invoke commands but I'm struggling to use them within VB WPF. Currently I'm on the final two lines but I just can't seem to…
james
  • 303
  • 1
  • 2
  • 14
0
votes
1 answer

jsp - Send error with attribute

I'm sending a custom error page for 404 in jsp. But I want to know if it is possible to add attributes to page, as request dispatcher does it. I have a user session to bar with some information, like its name, and other things, and I want to that…
wilmerlpr
  • 448
  • 6
  • 15
0
votes
1 answer

Swift Dispatch Groups with Parse queries

I have 4 functions containing Parse query.findObjectsInBackgroundWithBlock. These are being called to grab data and then populate the table view. Using dispatch groups. Here is two examples of my parse querys func getEventImages() { …
user4671001
  • 309
  • 2
  • 4
  • 12
0
votes
1 answer

dispatch_group_notify after second completion call

I have method with two completion calls and want to call dispatch_group_notify block after that. That works after first completion, but not after second. I need to have that worked after second call too. Here is my code: method1WithCompletion: and…
0
votes
1 answer

react native flux synchronous dispatch error

I'm building an app using the package alt that can be found here : https://github.com/goatslacker/alt I've got an error on logout action, because of synchronous dispatches I think and I don't understand how to use flux's waitFor call.. Here is my…
G. Hamaide
  • 7,078
  • 2
  • 36
  • 57
0
votes
1 answer

How to make a idle timer that detects editing activity in a UITextView

I want to allow the user to enter some notes in a UITextView before closing an app. But he/she might not enter anything or he/she might enter some text and then stop and do nothing for a long time. In either of those cases I want to close the…
RobertL
  • 14,214
  • 11
  • 38
  • 44
0
votes
1 answer

Dispatch fails with Proxy that requires authentication: Remotely Closed Connection

What is happening when I use dispatch to make a GET request? I can use a proxy, but I cannot use a proxy that requires authentication. This works: val ps = new ProxyServer(host, port) val svc = request.setProxyServer(ps) val resp = Http(svc >…
user2827214
  • 1,191
  • 1
  • 13
  • 32
0
votes
2 answers

Flash AS3 custom event should bubble up in "brother"MC

down vote Hi, this blogposts seem to be really old, but my question is fitting best in here. I am doing custom event dispatching on a MC construct like this main_MC/room_MC/button_MC main_MC/room2_MC I am dispatching a custom event from room_MC when…
0
votes
2 answers

Reference to a Method in a Package

I am trying to find a general solution to getting a reference to a method in a module. Assume that we have a Hello.pm module with a single method in it called "hello". In a calling program, one would write use Hello; Hello->hello('Hi There'); The…