meteorhacks / unblock

this.unblock inside publications :D
MIT License
87 stars 14 forks source link

Have the ability to tell when this.unblock() is a dummy function #8

Closed MasterAM closed 8 years ago

MasterAM commented 8 years ago

Sometimes we may want to avoid doing blocking work in case the dummy unblock() function is used. We may choose to defer the work in another way or to avoid it altogether.

I thought about either returning a certain value from the dummy function and testing against that value or set some property of the subscription (such as isFakeUnblock = true).

What do you think?

arunoda commented 8 years ago

unblock is to mimic Meteor's original unblock functionality. I think your feature request is important. But, I don't quite sure about it.

So, I'm gonna close it now.

MasterAM commented 8 years ago

I am writing a package that depends on something like this being implemented. Will you accept a PR that adds a return value or a custom property setup?

MasterAM commented 8 years ago

I created a PR anyway, in hope that it will make it easier for you (and fix some test setup code in the process).

This will help me help others :+1: