You can do that real time, but you have to hook into a lot of places (like collection retrieval, repository getList method, product view page, related products, upsells, and maybe a lot of others). Not to mention that you may have third party extensions that use product collections. My advice is to build an observer on the product save that sets the product to disabled when saved and your attribute has the value "disabled".
Or better yet, create a cron that runs periodically and checks for products with status enabled and your custom attribute "disabled" and sets those products to disabled (status attribute).
The drawback for the cron approach is that you may get a short period of time when the product is available even if it shouldn't be. The upside is that it does not matter where your change comes from (import, admin save, anything else), your products will get disabled.