in reply to Re^2: Fast provider feeding slow consumer
in thread Fast provider feeding slow consumer
it receives only a number instead of the complete line.
I have really no idea how that could possibly happen; nor do I see anything in the code you posted that would explain it.
If you haven't already solved it; please post the full code that demonstrates the problem and I'll try and re-create it here.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Fast provider feeding slow consumer
by leostereo (Beadle) on Apr 27, 2016 at 17:59 UTC | |
Dear BrowserUk Following , the current running code. Please note that . Since there is still some queries that returns empty values, I must check the result before sending to the db queue. When querie returns empty rssi , I put in the queue back and it takes between 3-8 times to get a valid value. I also introduce some delay, in order to avoid a loop in this process. In comment at line 28 , Im asking if are they going to the walker instead ? That's all . Leandro.
| [reply] [d/l] |
by BrowserUk (Patriarch) on Apr 27, 2016 at 18:52 UTC | |
This is the third copy of the same code you've posted. I downloaded the first copy a couple of hours ago; but as I don't have your DB; nor a bunch of willing clients connecting; nor a gaggle of machines who's smnp I can walk; it's going to take me a while to set things up here to see what is going on in your code. Be patient. With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |
by BrowserUk (Patriarch) on Apr 28, 2016 at 18:58 UTC | |
Since there is still some queries that returns empty values, Leandro, this appears to be a bug in IO::Socket::INET::Daemon, in as much as, it frequently calls the data callback when there is nothing to available read; and getline returns undef. I do not have the time to debug that module; but the simple workaround to it, is to move one line of code in your callback. change this:
To become this:
I think that should get you further. (And yes, the comment was wrong!). (And BTW: you really should get into the habit of using strict and my. Debugging would have been much simpler had your code been strict compliant.) With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] [select] |
|
Re^4: Fast provider feeding slow consumer
by Anonymous Monk on Apr 27, 2016 at 17:53 UTC | |
Following , the current running code. Please note that . Since there is still some queries that returns empty values, I must check the result before sending to the db queue. When querie returns empty rssi , I put in the queue back and it takes between 3-8 times to get a valid value. I also introduce some delay, in order to avoid a loop in this process. In comment at line 28 , Im asking if are they going to the walker instead ? That's all . Leandro.
| [reply] [d/l] |
|
Re^4: Fast provider feeding slow consumer
by Anonymous Monk on Apr 27, 2016 at 16:12 UTC | |
Regards, Leo.
Please note: | [reply] [d/l] |