I don't understand your answer yet; could you explain what you mean by "and that all concurrent consumers wait for intitialization is done".
when one thread initializes Y (in your case the Main Thread) it takes the lock on the instance of Z, then you spawn other threads in "par" to execute the "yield", they try to read X, but for X to initialize it needs the lock on the Z instance, which is still held by the Main Thread.