Questions tagged [runloop]

A run loop is the concept of running a local loop waiting for a specific event or timeout.

A run loop is the concept of running a local loop waiting for a specific event or timeout.

Such a loop keeps the current thread busy and does not return until the loop has finished, which can either be by a timeout value, an explicit stop signal or if there are no events to process anymore (depends on the specific implementation). Message pumps/loops in applications to process incomming events are typical run loops. But there are other types of local loops (e.g. to make an originally asynchronous process synchronous).

126 questions
0
votes
1 answer

cocoa - executing stuff, need to open window, get input, then continue w/o reentering runloop

Is there any way to do this? Right now, I get called, I'm doing things, I have to open a window to ask for input, then I have to FINISH doing things before I return from the original call. If I enter the runloop for the window, it never ends or…
fyngyrz
  • 2,458
  • 2
  • 36
  • 43
0
votes
1 answer

osx and objc - running a second run loop for a plugin?

C programmer here. I'm trying to make a plugin to a running OSX app open its own window, accept a button press, close the window and come back to the plugin - not quit the app. I've been able to get a window open using NSApp, and I've even got a…
fyngyrz
  • 2,458
  • 2
  • 36
  • 43
0
votes
1 answer

InputStream ios works without a RunLoop

I am writing an iOS app using InputStream and OutputStream. However, I find that I can both read and write from the streams without scheduling them in a RunLoop! I here is my ThreadFunc. Notice that I have commented out all the runLoop code, but it…
Vipul
  • 1
  • 4
0
votes
2 answers

Will Firebase read from cached data if i turned off setPersistenceEnabled in my app update (android)

Scenario I have released my app on play store which uses Firebase Realtime database Has set setPersistenceEnabled(true) for my each Firebase database. After tracking crashes for few weeks, I encountered this crash. After bit research, I came to…
0
votes
1 answer

Swift RunLoop blocks table view

So, I have a timer which increments a variable by one in my app delegate every 0.1 seconds. In my tableViewController, I have this number displayed in a cell. In the controller there is ANOTHER timer which reloads visible cells. Everything worked,…
Riccardo Perego
  • 203
  • 2
  • 9
0
votes
2 answers

Timer never fires in my pan gesture callback function

I am trying to show a button only when user starts panning for 0.3 seconds, to avoid showing the button instantaneously in some cases (e.g. at the end of zooming if fingers are not lifted together). To achieve that, I start a Timer when pan gesture…
Jack Guo
  • 3,959
  • 8
  • 39
  • 60
0
votes
3 answers

Stop NSRunLoop On Keypress

I'm writing a command line foundation tool in Mac OS X and would like the tool to quit on a keypress such as 'q'. The code is launching an asynchronous request for retrieving data from a remote server. This necessitates the NSRunLoop. At least…
BigBrother
  • 1,100
  • 1
  • 9
  • 17
0
votes
1 answer

Java: cannot exit from a custom RunLoop implementation

I am trying to create a custom run loop that basically run tasks in a FIFO order and provides three APIs: addTask(Task task), run() and exit() Task Interface public interface Task { public void perform(); public boolean isDone(); public…
TonyW
  • 18,375
  • 42
  • 110
  • 183
0
votes
1 answer

CFRunLoopRunInMode used recursively freezes the main window

For a cross-platform project with much legacy code, my Cocoa app uses only one NSWindow with a custom NSView that captures all the mouse events and draws all my app graphic details. I need to implement a local modal behavior and so I use inside the…
Dominique
  • 33
  • 5
0
votes
1 answer

Why need to add runUntilDate after the animation statement?

[UIView animateWithDuration:1 animations:^{ self.animateView.frame = CGRectMake(100, 100, 50, 50); } completion:^(BOOL finished) { if (finished) { NSLog(@"animation finished"); } }]; [[NSRunLoop currentRunLoop]…
Sugite
  • 41
  • 4
0
votes
2 answers

Swift 3, make timer, add to dictionary, never goes off

I have Thing and ThingManager If no one mentions a specific Thing for a while, I want ThingManager to forget about it. let manager = ThingManager() let thing1 = Thing(name: "thing1") manager.addThing(thing1) manager.sawSomeThing(named:…
snakeoil
  • 497
  • 4
  • 12
0
votes
1 answer

Can run_loop use a different identifier for resigning DeviceAgent-Runner.app

Setup: Xcode 8 OSX El Capitan (10.11.6) Physical iPhone6 (iOS 9.1) calabash-cucumber 0.20.3 Run_loop 2.2.2 First I tried to start the calabash console on the physical phone, but because it didn't have the DeviceAgent-Runner.app app it tried to…
Stefan
  • 131
  • 1
  • 1
0
votes
1 answer

Calabash-ios console can't start with DEVICE_TARGET='iPhone 5 (9.2)'

I am trying to start the test server I am getting the below error. Could you please some one give me the solution. I tried different combination of gem versions but no luck. Appreciated quick help on this. I am using command something like…
apparao
  • 5
  • 5
0
votes
1 answer

Call an action only once when it's called from two places

I have an app we have connected to Pubnub for a live socket service to keep data on the page fresh for the user. I have an ajax call that will do something with our API, and when it is successful I call an action on the application controller. At or…
Jordan
  • 2,393
  • 4
  • 30
  • 60
0
votes
3 answers

What's the difference between main event loop and app's run loop?

I tried to find the difference between those two loops in the internet but I didn't find any. I have read some articles they explained in such a way that both are same. I was been asked what's the difference between them and I have said what's there…
user4150758
  • 384
  • 4
  • 17
1 2 3
8 9