示例#1
0
mongoc_query_flags_t
future_get_mongoc_query_flags_t (future_t *future)
{
   if (future_wait (future)) {
      return future_value_get_mongoc_query_flags_t (&future->return_value);
   }

   fprintf (stderr, "%s timed out\n", BSON_FUNC);
   abort ();
}
示例#2
0
static void *
background_mongoc_collection_aggregate (void *data)
{
   future_t *future = (future_t *) data;
   future_value_t return_value;

   return_value.type = future_value_mongoc_cursor_ptr_type;

   future_value_set_mongoc_cursor_ptr (
      &return_value,
      mongoc_collection_aggregate (
         future_value_get_mongoc_collection_ptr (future_get_param (future, 0)),
         future_value_get_mongoc_query_flags_t (future_get_param (future, 1)),
         future_value_get_const_bson_ptr (future_get_param (future, 2)),
         future_value_get_const_bson_ptr (future_get_param (future, 3)),
         future_value_get_const_mongoc_read_prefs_ptr (future_get_param (future, 4))
      ));

   future_resolve (future, return_value);

   return NULL;
}