-/* Copyright (c) 2006-2021. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-2022. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
bool empty() const;
/* Returns the number of queued communications */
- unsigned int size() const;
+ size_t size() const;
/** Check if there is a communication going on in a mailbox. */
bool listen() const;
/** Blocking data transmission with timeout */
void put(void* payload, uint64_t simulated_size_in_bytes, double timeout);
- /** Creates (but don't start) a data reception onto that mailbox */
+ /** Creates (but don't start) a data reception onto that mailbox.
+ * @verbatim embed:rst:inline You probably want to use :cpp:func:`simgrid::s4u::Comm::set_dst_data` and friends before starting that activity. @endverbatim */
CommPtr get_init();
/** Creates and start an async data reception to that mailbox */
template <typename T> CommPtr get_async(T** data);
/** Blocking data reception with timeout */
template <typename T> T* get(double timeout);
template <typename T> std::unique_ptr<T> get_unique(double timeout) { return std::unique_ptr<T>(get<T>(timeout)); }
-
-#ifndef DOXYGEN
- XBT_ATTRIB_DEPRECATED_v331("Please use typed template Mailbox::get_async<>()") CommPtr get_async(void** data);
- XBT_ATTRIB_DEPRECATED_v331("Please use typed template Mailbox::get<>()") void* get();
- XBT_ATTRIB_DEPRECATED_v331("Please use typed template Mailbox::get<>()") void* get(double timeout);
-#endif
};
template <typename T> CommPtr Mailbox::get_async(T** data)
get_async<T>(&res)->wait_for(timeout);
return res;
}
-
-#ifndef DOXYGEN
-inline CommPtr Mailbox::get_async(void** data) // XBT_ATTRIB_DEPRECATED_v331
-{
- return get_async<void>(data);
-}
-inline void* Mailbox::get() // XBT_ATTRIB_DEPRECATED_v331
-{
- return get<void>();
-}
-inline void* Mailbox::get(double timeout) // XBT_ATTRIB_DEPRECATED_v331
-{
- return get<void>(timeout);
-}
-#endif
} // namespace s4u
} // namespace simgrid