On 03/17/2015 09:23 PM, Sze Howe Koh wrote:
>
>> Well, my situation already needs me to poll objects periodically.
>> The following is indicative of my problem:
>>
>> while(1)
>> {
>> for(all_objects)
>> {
>>ret = object[i]->execute()
>>if(ret == complete) all_objects.remove
On 17 March 2015 at 23:39, Syam Krishnan wrote:
> On 03/17/2015 08:51 PM, André Somers wrote:
>> Well, in any multi-threaded programming, you basicaly have no control
>> over when something runs. That's up to the OS, not you. It will usually
>> be "soonish", but...
True. The only time when I've e
On 03/17/2015 08:51 PM, André Somers wrote:
> Well, in any multi-threaded programming, you basicaly have no control
> over when something runs. That's up to the OS, not you. It will usually
> be "soonish", but...
Understood.
>>> That is not acceptable to me. I am looking for the simplest solution
Sze Howe Koh schreef op 17-3-2015 om 16:15:
> Hi,
>
> On 17 March 2015 at 23:06, Syam Krishnan wrote:
>> On 03/17/2015 08:03 PM, André Somers wrote:
>>> Might I suggest a third method? Use QtConcurrent::run(yourFunction)
>>> instead.
>> The documentation on QtConcurrent::run() says
>> "Note that t
Hi,
On 17 March 2015 at 23:06, Syam Krishnan wrote:
> On 03/17/2015 08:03 PM, André Somers wrote:
>> Might I suggest a third method? Use QtConcurrent::run(yourFunction)
>> instead.
>
> The documentation on QtConcurrent::run() says
> "Note that the function may not run immediately; the function wi
On 03/17/2015 08:03 PM, André Somers wrote:
> Might I suggest a third method? Use QtConcurrent::run(yourFunction)
> instead.
The documentation on QtConcurrent::run() says
"Note that the function may not run immediately; the function will only
be run when a thread is available."
That is not accep
Syam Krishnan schreef op 17-3-2015 om 15:18:
> Hi
>
> I have a function that I need to execute as in a thread in response to
> some event. The event is not a signal.
> My function do_something() typically takes less than 20 milliseconds to
> finish.
>
> Method-1
> --
> 1. I derive from QThr
Hi
I have a function that I need to execute as in a thread in response to
some event. The event is not a signal.
My function do_something() typically takes less than 20 milliseconds to
finish.
Method-1
--
1. I derive from QThread and override run() to:
void run()
{
do_something();