Conversation Between IQstim and jMerliN

13 Visitor Messages

  1. hello jmerl, how's it going?
  2. hey man!

    that xtunnel project, how's it? i've read the entire post but i don't know where to start! :p
  3. ilove you ron. forced meme it is. im totally bored. excuse me :P
  4. Sweet :). Multithreading is pretty neat huh? :D
  5. i've fixed it! :P
  6. So you're trying to have 2 threads run a loop outputting stuff at the same time? The standard output is shared, you need to have some kind of synchronization object protecting access to it like a mutex. Each thread should lock the mutex before it prints some text, then locks it afterwards so the other threads can do what they need. Alternatively, you can have each thread output to a different file :P (the above method on stdout will result in interleaving which is ugly for output, but that's what happens when you multithread :x)
  7. let's say that the process writes 5 lines of texts, supposedly. but 2 particular lines were skipped/unwritten.

    i'm using a dll, which keeps my engagement easy. it works accodingly:

    handle = create('
    while(true) {}
    ', suspended?);
    resume(handle);

    i've treid:
    handle = create('
    while(true) {cout << "Sample" << endl;}
    ', suspended?);
    resume(handle);

    and it works as expected.
  8. That loop alone shouldn't be a problem. I'd have to see more to be able to tell you anything. Race conditions and shared resources are the primary difficulty in threading, once you eliminate those it's quite simple.

    I'm not sure what you mean by 'speed' and when lines were skipped and when the process stops.
  9. hey, Merlin. i need some insight on multi-threading.

    i've encountered a difficulty, in regards to a thread's speed. also, might i ask: does a thread process data simultaneously? something is bugging me, and for most that is:

    while(true)
    {
    something();
    }

    the result seem somewhat unexpected, the job wasn't done perfectly as some lines of the process were skipped, and sometimes it stops suddenly.
  10. Yes, in this case, 00 (0 to the power of 0) can be regarded as 1, which doesn't break the identity.

    The reason why I asked the additional question is that I take both "all x" and "all but -1" as answers, but for those that answer "all x", I ensure with the question that they have considered the special case of x=-1, and not just disregarded it without a reason, as that could be a big mistake.

    Thanks for participating. :)
  11. The simplification of the problem shows that it's actually a constant function 1, therefore the x is completely insignificant. If you evaluate the expressions by substituting the place-holder 'x' for its value THEN simplify, you get an indeterminant form (much how computers generally try to do it). Symbolically -1 doesn't present a problem.
  12. What about the special case of x=-1? The final term of the sum yields (1+x)n-n = 00, the indeterminate form. Does this mean your answer is wrong...?
Showing Visitor Messages 1 to 13 of 13

Advertisement