Questions about timing within synchronized blocks

From: Robert Mark Bram (none)
Date: 05/31/04


Date: Tue, 1 Jun 2004 02:50:58 +1000

Hi All!

I have some questions about timing with synchronization.. Which is better:

Object sync;
...
  synchronized (sync){
    // Do important stuff..
    sync.notifyAll();
  } // end synchronized

or this:
  synchronized (sync){
    // Do important stuff..
  } // end synchronized
  sync.notifyAll();

In the first example, is there any chance that the timing will stuff up and
when blocked threads get notified, Java still thinks control is in the
synchronized section?

If I do something like this:
  synchronized (sync){
    // Do important stuff..
    sync.notifyAll();
    // Do more important stuff..
  } // end synchronized

Obviously this is deadlock making code.. but what if "Do more important
stuff" was just "i+=1".. could it still work then?

Thanks for any advice!

Rob
:)



Relevant Pages

  • Re: Multiple User Uplink timeing Sync.
    ... synchronization occur in up link of scfdma since if any one of the user ... First, would you care to get down from the tree, learn how to wear pants ... tracks the turnaround delay. ... The timing is adjusted so the packets from ...
    (comp.dsp)
  • ISDB-T synchronization
    ... I am doing the synchronization for ISDB-T at the moment. ... synchronization since we may use them to estimate the time domain CIR. ... However, if differential modulation is adopted, there will not be available ... SP in the frequency domain, in this case, how fine timing sychronization is ...
    (comp.dsp)
  • Timing, Frequency synchronization using matlab
    ... hii..i need matlab code for timing and frequency synchronization in ... OFDM communication(or in any digital communication.. ...
    (comp.soft-sys.matlab)
  • synchronization in OFDM and others...
    ... However as far as I understand, OFDM uses ... synchronization in software radios (chris dick, fred harris, michael ... high speed all digital symbol timing recovery based on FPGA (Zhang Jian, ...
    (comp.dsp)