Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Boolean OR binding with two ReadOnlyBooleanWrapper fails

cshApr 7 2016 — edited May 2 2016

Hi,

please consider the following code. I am expecting that both Labels are visible, because A || B == B || A, but only the second one is visible:

When I replace ReadOnlyBooleanWrapper with SimpleBooleanProperty it works as expected.

Feels like a bug to me?!

import javafx.application.Application;

import javafx.beans.property.BooleanProperty;

import javafx.beans.property.ReadOnlyBooleanWrapper;

import javafx.scene.Scene;

import javafx.scene.control.Label;

import javafx.scene.layout.VBox;

import javafx.stage.Stage;

public class TestApp3 extends Application {

   public static void main(String[] args) {

   launch(args);

  }

   private final BooleanProperty first = new ReadOnlyBooleanWrapper(false);

   private final BooleanProperty second = new ReadOnlyBooleanWrapper(false);

   @Override
   public void start(final Stage stage) throws Exception {

  Label label1 = new Label("first");

  Label label2 = new Label("second");

  label1.visibleProperty().bind(first.or(second));

  label2.visibleProperty().bind(second.or(first));

   first.set(true);

  Scene scene = new Scene(new VBox(label1, label2));

  stage.setScene(scene);

  stage.show();

  }

}

Comments

Yoda-Oracle

Hi,

Your Zone now has 16GB of RAM. Please let me know if that is sufficient

-Angelo

1336415

Thank you. Now memory limit is sufficient.

But CPU offloading still shows that while DAX doing its work - CPU core busy too.

With new memory limit vector_in_range() takes 0,8 seconds to complete. Let's run it in cycle on the same thread id with "yes > /dev/null" (using pbind). Again, we see that yes shares CPU time with dax-in-range:

   PID USERNAME USR SYS TRP TFL DFL LCK SLP LAT VCX ICX SCL SIG PROCESS/LWP  

19860 dglushe* 99 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0  30 34K   0 yes/1

19868 dglushe* 99 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0  30 34K   0 yes/1

19864 dglushe* 99 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0  30 34K   0 yes/1

19866 dglushe* 99 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0  30 34K   0 yes/1

19857 dglushe* 99 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0  30 34K   0 yes/1

19862 dglushe* 99 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0  30 34K   0 yes/1

19870 dglushe* 99 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0  30 34K   0 yes/1

19880 dglushe* 50  15 0.1 0.0 0.0 0.0 0.0  35   1  23 .1M 0 dax-in-range/1

19850 dglushe*  34 0.3 0.0 0.0 0.0 0.0 0.0  65 0  24 10K   0 yes/1

1336415
Answer

Oh, I see you shared dax.h. It seems that vector.so uses synchronous DAX calls, but dax.h states that there are asynchronous calls too:

/*

    NAME: dax_post - family of functions that post asynchronous dax requests

    SYNOPSIS:

  */

..

dax_status_t dax_scan_range_post(dax_queue_t *queue, uint64_t flags,
    dax_vec_t *src, dax_vec_t *dst, dax_compare_t op, dax_int_t *lower,
    dax_int_t *upper, void *udata);


No more questions, thank you!

Marked as Answer by 1336415 · Sep 27 2020
1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on May 30 2016
Added on Apr 7 2016
2 comments
686 views